Date: Thu, 9 Sep 2010 00:34:55 +0000 (UTC) From: Weongyo Jeong <weongyo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r212344 - user/weongyo/usb/sys/dev/usb/net Message-ID: <201009090034.o890Yt4R006115@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009090034.o890Yt4R006115>