svn commit: r266466 - head/sys/dev/usb/wlan
Hans Petter Selasky
hselasky at FreeBSD.org
Tue May 20 12:22:53 UTC 2014
Author: hselasky
Date: Tue May 20 12:22:53 2014
New Revision: 266466
URL: http://svnweb.freebsd.org/changeset/base/266466
Log:
Make sure detach code is executed in all cases. This fixes a panic
when debugging is enabled.
Reported by: Idwer Vollering <vidwer at gmail.com>
MFC after: 3 days
Modified:
head/sys/dev/usb/wlan/if_rsu.c
Modified: head/sys/dev/usb/wlan/if_rsu.c
==============================================================================
--- head/sys/dev/usb/wlan/if_rsu.c Tue May 20 10:28:19 2014 (r266465)
+++ head/sys/dev/usb/wlan/if_rsu.c Tue May 20 12:22:53 2014 (r266466)
@@ -423,8 +423,6 @@ rsu_detach(device_t self)
struct ifnet *ifp = sc->sc_ifp;
struct ieee80211com *ic = ifp->if_l2com;
- if (!device_is_attached(self))
- return (0);
rsu_stop(ifp, 1);
usbd_transfer_unsetup(sc->sc_xfer, RSU_N_TRANSFER);
ieee80211_ifdetach(ic);
@@ -454,7 +452,7 @@ rsu_do_request(struct rsu_softc *sc, str
while (ntries--) {
err = usbd_do_request_flags(sc->sc_udev, &sc->sc_mtx,
req, data, 0, NULL, 250 /* ms */);
- if (err == 0 || !device_is_attached(sc->sc_dev))
+ if (err == 0 || err == USB_ERR_NOT_CONFIGURED)
break;
DPRINTFN(1, "Control request failed, %s (retrying)\n",
usbd_errstr(err));
More information about the svn-src-head
mailing list