diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2009-06-02 17:27:40 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2009-06-02 17:27:40 +0000 |
commit | 480e6d488fd326ab2dabdb02127a6b300d07795c (patch) | |
tree | 98ff9fa954b4c9ca2eb0241215a63ac47deeba58 /sys/dev/cardbus | |
parent | 8a695611f6f56d2cb8adf2bff424e36a79473c36 (diff) |
make rl at pci detachable; untested.
Diffstat (limited to 'sys/dev/cardbus')
-rw-r--r-- | sys/dev/cardbus/if_rl_cardbus.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/sys/dev/cardbus/if_rl_cardbus.c b/sys/dev/cardbus/if_rl_cardbus.c index 505106fee15..7fa6adb6b00 100644 --- a/sys/dev/cardbus/if_rl_cardbus.c +++ b/sys/dev/cardbus/if_rl_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rl_cardbus.c,v 1.16 2007/05/08 18:49:32 deraadt Exp $ */ +/* $OpenBSD: if_rl_cardbus.c,v 1.17 2009/06/02 17:27:39 jsg Exp $ */ /* $NetBSD: if_rl_cardbus.c,v 1.3.8.3 2001/11/14 19:14:02 nathanw Exp $ */ /* @@ -212,35 +212,6 @@ rl_cardbus_attach(parent, self, aux) rl_attach(sc); } -extern int rl_detach(struct rl_softc *); - -int -rl_detach(sc) - struct rl_softc *sc; -{ - struct ifnet *ifp = &sc->sc_arpcom.ac_if; - - /* Unhook our tick handler. */ - timeout_del(&sc->sc_tick_tmo); - - /* Detach any PHYs we might have. */ - if (LIST_FIRST(&sc->sc_mii.mii_phys) != NULL) - mii_detach(&sc->sc_mii, MII_PHY_ANY, MII_OFFSET_ANY); - - /* Delete any remaining media. */ - ifmedia_delete_instance(&sc->sc_mii.mii_media, IFM_INST_ANY); - - ether_ifdetach(ifp); - if_detach(ifp); - - if (sc->sc_sdhook != NULL) - shutdownhook_disestablish(sc->sc_sdhook); - if (sc->sc_pwrhook != NULL) - powerhook_disestablish(sc->sc_pwrhook); - - return (0); -} - int rl_cardbus_detach(self, flags) struct device *self; |