summaryrefslogtreecommitdiff
path: root/sys/dev/cardbus/if_fxp_cardbus.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2009-06-02 16:50:21 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2009-06-02 16:50:21 +0000
commitb3284db37f807ede1a336a6386d90497400711fd (patch)
tree0ed8e6e68fdb6e94746074ac95248bbf5b7ec680 /sys/dev/cardbus/if_fxp_cardbus.c
parentcaba12193a3fbed4b1793760f627ce31a39716f3 (diff)
Make fxp at pci detachable; untested.
Diffstat (limited to 'sys/dev/cardbus/if_fxp_cardbus.c')
-rw-r--r--sys/dev/cardbus/if_fxp_cardbus.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/sys/dev/cardbus/if_fxp_cardbus.c b/sys/dev/cardbus/if_fxp_cardbus.c
index c9bd29fa8fd..3d7a0c02074 100644
--- a/sys/dev/cardbus/if_fxp_cardbus.c
+++ b/sys/dev/cardbus/if_fxp_cardbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fxp_cardbus.c,v 1.22 2008/06/26 05:42:14 ray Exp $ */
+/* $OpenBSD: if_fxp_cardbus.c,v 1.23 2009/06/02 16:50:20 jsg Exp $ */
/* $NetBSD: if_fxp_cardbus.c,v 1.12 2000/05/08 18:23:36 thorpej Exp $ */
/*
@@ -213,34 +213,6 @@ fxp_cardbus_setup(struct fxp_softc *sc)
cardbus_conf_write(cc, cf, csc->ct_tag, CARDBUS_COMMAND_STATUS_REG, command);
}
-int fxp_detach(struct fxp_softc *);
-
-int
-fxp_detach(struct fxp_softc *sc)
-{
- struct ifnet *ifp = &sc->sc_arpcom.ac_if;
-
- /* Unhook our tick handler. */
- timeout_del(&sc->stats_update_to);
-
- /* 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_powerhook != NULL)
- powerhook_disestablish(sc->sc_powerhook);
-
- return (0);
-}
-
int
fxp_cardbus_detach(struct device *self, int flags)
{