summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2007-02-27 18:45:37 +0000
committerjhb <jhb@FreeBSD.org>2007-02-27 18:45:37 +0000
commit19438f4ae6b7056c63f27512ade945121aba319d (patch)
tree405a50c81719b50d5654f7c0f5113c9964f78edd
parenta9d161a0a712d9523a53c29742ee196de3c4c831 (diff)
downloadFreeBSD-src-19438f4ae6b7056c63f27512ade945121aba319d.zip
FreeBSD-src-19438f4ae6b7056c63f27512ade945121aba319d.tar.gz
Use taskqueue_drain() to wait for any pending tasks to complete rather
than just pausing for a second.
-rw-r--r--sys/dev/re/if_re.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index d3328e0..de9b273 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -1365,6 +1365,8 @@ re_detach(dev)
re_stop(sc);
RL_UNLOCK(sc);
callout_drain(&sc->rl_stat_callout);
+ taskqueue_drain(taskqueue_fast, &sc->rl_inttask);
+ taskqueue_drain(taskqueue_fast, &sc->rl_txtask);
/*
* Force off the IFF_UP flag here, in case someone
* still had a BPF descriptor attached to this
@@ -1398,10 +1400,6 @@ re_detach(dev)
if (sc->rl_res)
bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res);
- /* Yield the CPU long enough for any tasks to drain */
-
- tsleep(sc, PPAUSE, "rewait", hz);
-
/* Unload and free the RX DMA ring memory and map */
if (sc->rl_ldata.rl_rx_list_tag) {
OpenPOWER on IntegriCloud