diff options
author | jhb <jhb@FreeBSD.org> | 2005-08-17 17:44:32 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-08-17 17:44:32 +0000 |
commit | dd48b0ad7c3a4439d849fd6a235da746148027e1 (patch) | |
tree | 216e7a152ceed2329243d09bd612e26c269c931b /sys | |
parent | f453d156acbb3f93922257bde7e311c1174fd751 (diff) | |
download | FreeBSD-src-dd48b0ad7c3a4439d849fd6a235da746148027e1.zip FreeBSD-src-dd48b0ad7c3a4439d849fd6a235da746148027e1.tar.gz |
Add callout_drain()'s to foo_detach() after calling foo_stop() to make sure
that if softclock is running on another CPU and is blocked on our driver
lock, we will wait until it has acquired the lock, seen that it was
cancelled, dropped the lock, and awakened us so that we can safely destroy
the mutex.
MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/fxp/if_fxp.c | 1 | ||||
-rw-r--r-- | sys/dev/hme/if_hme.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index f87325b..a51509e 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -901,6 +901,7 @@ fxp_detach(device_t dev) CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE); fxp_stop(sc); FXP_UNLOCK(sc); + callout_drain(&sc->stat_ch); /* * Close down routes etc. diff --git a/sys/dev/hme/if_hme.c b/sys/dev/hme/if_hme.c index 7033691..8ed71b1 100644 --- a/sys/dev/hme/if_hme.c +++ b/sys/dev/hme/if_hme.c @@ -388,6 +388,7 @@ hme_detach(struct hme_softc *sc) HME_LOCK(sc); hme_stop(sc); HME_UNLOCK(sc); + callout_drain(&sc->sc_tick_ch); device_delete_child(sc->sc_dev, sc->sc_miibus); for (i = 0; i < HME_NTXQ; i++) { |