summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorsimokawa <simokawa@FreeBSD.org>2003-01-07 04:26:45 +0000
committersimokawa <simokawa@FreeBSD.org>2003-01-07 04:26:45 +0000
commitc771fcdd6192902edb48a17505270c4335c70546 (patch)
treed9e400591db21c882cacdf252e42ca7b726a0b0c /sys/dev
parent809261a95178073827071a1a118be67ae69d9e45 (diff)
downloadFreeBSD-src-c771fcdd6192902edb48a17505270c4335c70546.zip
FreeBSD-src-c771fcdd6192902edb48a17505270c4335c70546.tar.gz
Don't call fw_bus_probe() twice when successive self-id packets received.
This change should stabilize SBP-II device probing.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/firewire/firewire.c10
-rw-r--r--sys/dev/firewire/firewirereg.h2
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c
index 612997c..e6023cb 100644
--- a/sys/dev/firewire/firewire.c
+++ b/sys/dev/firewire/firewire.c
@@ -522,6 +522,13 @@ firewire_attach( device_t dev )
#endif
sc->fc->timeouthandle = timeout((timeout_t *)sc->fc->timeout, (void *)sc->fc, hz * 10);
+ callout_init(&sc->fc->busprobe_callout
+#if __FreeBSD_version >= 500000
+ , /* mpsafe? */ 0);
+#else
+ );
+#endif
+
/* Locate our children */
bus_generic_probe(dev);
@@ -1215,7 +1222,8 @@ void fw_sidrcv(struct firewire_comm* fc, caddr_t buf, u_int len, u_int off)
}
#endif
#if 1
- timeout((timeout_t *)fw_bus_probe, (void *)fc, hz/4);
+ callout_reset(&fc->busprobe_callout, hz/4,
+ (void *)fw_bus_probe, (void *)fc);
#else
fw_bus_probe(fc);
#endif
diff --git a/sys/dev/firewire/firewirereg.h b/sys/dev/firewire/firewirereg.h
index 9549a29..bfa7256 100644
--- a/sys/dev/firewire/firewirereg.h
+++ b/sys/dev/firewire/firewirereg.h
@@ -225,7 +225,7 @@ struct firewire_comm{
u_int32_t *config_rom;
struct fw_topology_map *topology_map;
struct fw_speed_map *speed_map;
- struct callout_handle tlhandle;
+ struct callout busprobe_callout;
struct callout_handle bmrhandle;
struct callout_handle timeouthandle;
struct callout_handle retry_probe_handle;
OpenPOWER on IntegriCloud