svn commit: r212344 - user/weongyo/usb/sys/dev/usb/net
Weongyo Jeong
weongyo at FreeBSD.org
Thu Sep 9 00:34:55 UTC 2010
Author: weongyo
Date: Thu Sep 9 00:34:55 2010
New Revision: 212344
URL: http://svn.freebsd.org/changeset/base/212344
Log:
Detaching the miibus child should be happen after draining all parent
tasks because it could access miibus API (e.g. calling mii_tick()).
Modified:
user/weongyo/usb/sys/dev/usb/net/if_axe.c
Modified: user/weongyo/usb/sys/dev/usb/net/if_axe.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/net/if_axe.c Thu Sep 9 00:31:23 2010 (r212343)
+++ user/weongyo/usb/sys/dev/usb/net/if_axe.c Thu Sep 9 00:34:55 2010 (r212344)
@@ -847,13 +847,12 @@ axe_detach(device_t dev)
struct axe_softc *sc = device_get_softc(dev);
struct ifnet *ifp = sc->sc_ifp;
- if (sc->sc_miibus != NULL)
- device_delete_child(sc->sc_dev, sc->sc_miibus);
-
sleepout_drain(&sc->sc_watchdog);
taskqueue_drain(sc->sc_sleepout.s_taskqueue, &sc->sc_setmulti);
usbd_transfer_unsetup(sc->sc_xfer, AXE_N_TRANSFER);
+ if (sc->sc_miibus != NULL)
+ device_delete_child(sc->sc_dev, sc->sc_miibus);
if (ifp != NULL) {
AXE_LOCK(sc);
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
More information about the svn-src-user
mailing list