1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-23 07:31:31 +00:00

try to unsetup USB xfers before calling ieee80211_ifdetach() to fix a

bug referencing a destroyed lock within TX callbacks during device
detach.

Submitted by:	hps (original version)
Tested by:	Lucius Windschuh <lwindschuh at googlemail.com>
This commit is contained in:
Weongyo Jeong 2009-05-20 03:49:16 +00:00
parent e32035ce1e
commit e557e68088
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=192419
2 changed files with 2 additions and 2 deletions

View File

@ -517,12 +517,12 @@ uath_detach(device_t dev)
sc->sc_flags |= UATH_FLAG_INVALID;
uath_stop(ifp);
ieee80211_ifdetach(ic);
callout_drain(&sc->stat_ch);
callout_drain(&sc->watchdog_ch);
usb2_transfer_unsetup(sc->sc_xfer, UATH_N_XFERS);
ieee80211_ifdetach(ic);
/* free buffers */
UATH_LOCK(sc);

View File

@ -2002,12 +2002,12 @@ upgt_detach(device_t dev)
return 0;
upgt_stop(sc);
ieee80211_ifdetach(ic);
callout_drain(&sc->sc_led_ch);
callout_drain(&sc->sc_watchdog_ch);
usb2_transfer_unsetup(sc->sc_xfer, UPGT_N_XFERS);
ieee80211_ifdetach(ic);
upgt_free_rx(sc);
upgt_free_tx(sc);