diff options
| author | Brian Feldman <green@FreeBSD.org> | 2004-08-09 20:22:17 +0000 |
|---|---|---|
| committer | Brian Feldman <green@FreeBSD.org> | 2004-08-09 20:22:17 +0000 |
| commit | 6eb3cb4a13a51d0deb4822d066682b1ea3f51eca (patch) | |
| tree | f89420b2ad3a876ac93d574c99a72e4866104373 /sys/pci | |
| parent | 332e72ddb79ffd7247bd9aa30caaecac2bb9b215 (diff) | |
Notes
Diffstat (limited to 'sys/pci')
| -rw-r--r-- | sys/pci/if_rl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index 2da3b927bc59..1fae9fe955be 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -1001,21 +1001,22 @@ rl_detach(device_t dev) { struct rl_softc *sc; struct ifnet *ifp; + int attached; sc = device_get_softc(dev); ifp = &sc->arpcom.ac_if; KASSERT(mtx_initialized(&sc->rl_mtx), ("rl mutex not initialized")); + attached = device_is_attached(dev); + /* These should only be active if attach succeeded */ + if (attached) + ether_ifdetach(ifp); RL_LOCK(sc); #if 0 sc->suspended = 1; #endif - - /* These should only be active if attach succeeded */ - if (device_is_attached(dev)) { + if (attached) rl_stop(sc); - ether_ifdetach(ifp); - } if (sc->rl_miibus) device_delete_child(dev, sc->rl_miibus); bus_generic_detach(dev); |
