summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorNathan Binkert <nate@cvs.openbsd.org>2000-10-27 18:48:28 +0000
committerNathan Binkert <nate@cvs.openbsd.org>2000-10-27 18:48:28 +0000
commitc356935b9ff4ef40b25dbbf0c67eb64999305ece (patch)
tree30bffd7ad9f457b7060f4e20f10494e4a25071f5 /sys/dev
parent1f17ed9cbcefc7c44c2f775bdb1f882f6e8d7359 (diff)
Make cardbus version of dc detach properly. OK aaron@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/cardbus/if_dc_cardbus.c12
1 files changed, 3 insertions, 9 deletions
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 <sys/param.h>
#include <sys/systm.h>
@@ -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,