From a2f9548d05ca868eaea4c8c4ff80a33e4a622020 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Wed, 28 Sep 2005 09:27:46 +0000 Subject: [PATCH] Fix "taskqueue_drain with the following non-sleepable locks held" witness(9) warning on detach. --- sys/dev/wi/if_wi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index a55bfb6035a..d8b6c315b9d 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -529,12 +529,12 @@ wi_detach(device_t dev) sc->wi_gone |= !bus_child_present(dev); wi_stop(ifp, 0); + WI_UNLOCK(sc); #if NBPFILTER > 0 bpfdetach(ifp); #endif ieee80211_ifdetach(&sc->sc_ic); - WI_UNLOCK(sc); bus_teardown_intr(dev, sc->irq, sc->wi_intrhand); if_free(sc->sc_ifp); wi_free(dev);