From 848c8c369f93d76df009ee1a63be736b68927a61 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 2 Jun 2009 07:55:11 +0000 Subject: The xl_detach() function is now used by pci code, so it must be in the shared code in case either cardbus or pci varients are not configured. --- sys/dev/cardbus/if_xl_cardbus.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) (limited to 'sys/dev/cardbus/if_xl_cardbus.c') diff --git a/sys/dev/cardbus/if_xl_cardbus.c b/sys/dev/cardbus/if_xl_cardbus.c index 5b3f333f9b9..d3d663aad0d 100644 --- a/sys/dev/cardbus/if_xl_cardbus.c +++ b/sys/dev/cardbus/if_xl_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xl_cardbus.c,v 1.20 2008/02/25 20:32:10 brad Exp $ */ +/* $OpenBSD: if_xl_cardbus.c,v 1.21 2009/06/02 07:55:08 deraadt Exp $ */ /* $NetBSD: if_xl_cardbus.c,v 1.13 2000/03/07 00:32:52 mycroft Exp $ */ /* @@ -293,35 +293,6 @@ xl_cardbus_attach(struct device *parent, struct device *self, void *aux) } -int -xl_detach(struct xl_softc *sc) -{ - struct ifnet *ifp = &sc->sc_arpcom.ac_if; - extern void xl_freetxrx(struct xl_softc *); - - /* Unhook our tick handler. */ - timeout_del(&sc->xl_stsup_tmo); - - xl_freetxrx(sc); - - /* Detach all PHYs */ - if (sc->xl_hasmii) - mii_detach(&sc->sc_mii, MII_PHY_ANY, MII_OFFSET_ANY); - - /* Delete all 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 xl_cardbus_detach(struct device *self, int arg) { -- cgit v1.2.3