From c356935b9ff4ef40b25dbbf0c67eb64999305ece Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Fri, 27 Oct 2000 18:48:28 +0000 Subject: Make cardbus version of dc detach properly. OK aaron@ --- sys/dev/cardbus/if_dc_cardbus.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'sys') diff --git a/sys/dev/cardbus/if_dc_cardbus.c b/sys/dev/cardbus/if_dc_cardbus.c index bb2e892213b..1f2803f0130 100644 --- a/sys/dev/cardbus/if_dc_cardbus.c +++ b/sys/dev/cardbus/if_dc_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_dc_cardbus.c,v 1.2 2000/10/26 22:37:04 aaron Exp $ */ +/* $OpenBSD: if_dc_cardbus.c,v 1.3 2000/10/27 18:48:27 nate Exp $ */ #include #include @@ -196,16 +196,10 @@ dc_cardbus_detach(self, flags) struct dc_softc *sc = &csc->sc_dc; struct cardbus_devfunc *ct = csc->sc_ct; struct ifnet *ifp = &sc->arpcom.ac_if; -#if 0 - struct mii_softc *msc; -#endif int rv = 0; -#if 0 - for (msc = LIST_FIRST(&sc->sc_mii.mii_phys); msc; - msc = LIST_FIRST(&sc->sc_mii.mii_phys)) - rv |= mii_detach(msc, flags); -#endif + if (LIST_FIRST(&sc->sc_mii.mii_phys) != NULL) + mii_detach(&sc->sc_mii, MII_PHY_ANY, MII_OFFSET_ANY); /* unmap cardbus resources */ Cardbus_mapreg_unmap(ct, -- cgit v1.2.3