diff options
author | simokawa <simokawa@FreeBSD.org> | 2003-01-07 04:26:45 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2003-01-07 04:26:45 +0000 |
commit | c771fcdd6192902edb48a17505270c4335c70546 (patch) | |
tree | d9e400591db21c882cacdf252e42ca7b726a0b0c | |
parent | 809261a95178073827071a1a118be67ae69d9e45 (diff) | |
download | FreeBSD-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.
-rw-r--r-- | sys/dev/firewire/firewire.c | 10 | ||||
-rw-r--r-- | sys/dev/firewire/firewirereg.h | 2 |
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; |