diff options
author | John Baldwin <jhb@FreeBSD.org> | 2007-02-27 18:45:37 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2007-02-27 18:45:37 +0000 |
commit | 3d4c1b5744e217427711d71c0a550120ca12a7ef (patch) | |
tree | 405a50c81719b50d5654f7c0f5113c9964f78edd | |
parent | 8410d79dd1966ff046bb36f7dc5f8c2254c1620e (diff) | |
download | src-3d4c1b5744e217427711d71c0a550120ca12a7ef.tar.gz src-3d4c1b5744e217427711d71c0a550120ca12a7ef.zip |
Use taskqueue_drain() to wait for any pending tasks to complete rather
than just pausing for a second.
Notes
Notes:
svn path=/head/; revision=167088
-rw-r--r-- | sys/dev/re/if_re.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index d3328e02f003..de9b273d05f5 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) { |