summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornate <nate@openbsd.org>2000-08-26 20:08:39 +0000
committernate <nate@openbsd.org>2000-08-26 20:08:39 +0000
commit6525a8c92cd5f1445572a58c3b8f4712e139a3b0 (patch)
tree0e85870c4e3f06266d3ed8a1742803d7c1036ede
parentsync mii code with netbsd (diff)
downloadwireguard-openbsd-6525a8c92cd5f1445572a58c3b8f4712e139a3b0.tar.xz
wireguard-openbsd-6525a8c92cd5f1445572a58c3b8f4712e139a3b0.zip
Add support for detach of xe and aue.
-rw-r--r--sys/dev/pcmcia/if_xe.c8
-rw-r--r--sys/dev/usb/if_aue.c6
-rw-r--r--sys/dev/usb/usb_port.h3
3 files changed, 9 insertions, 8 deletions
diff --git a/sys/dev/pcmcia/if_xe.c b/sys/dev/pcmcia/if_xe.c
index ca62715ecce..f2823a6b4a4 100644
--- a/sys/dev/pcmcia/if_xe.c
+++ b/sys/dev/pcmcia/if_xe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xe.c,v 1.15 2000/06/02 02:17:37 bjc Exp $ */
+/* $OpenBSD: if_xe.c,v 1.16 2000/08/26 20:08:39 nate Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist, Brandon Creighton, Job de Haas
@@ -462,12 +462,10 @@ xe_pcmcia_detach(dev, flags)
struct xe_pcmcia_softc *psc = (struct xe_pcmcia_softc *)dev;
struct xe_softc *sc = &psc->sc_xe;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
- struct mii_softc *msc;
int rv = 0;
- for (msc = LIST_FIRST(&sc->sc_mii.mii_phys); msc;
- msc = LIST_FIRST(&sc->sc_mii.mii_phys))
- rv |= mii_detach(msc, flags);
+ mii_detach(&sc->sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
+ ifmedia_delete_instance(&sc->sc_mii.mii_media, IFM_INST_ANY);
pcmcia_io_unmap(psc->sc_pf, psc->sc_io_window);
pcmcia_io_free(psc->sc_pf, &psc->sc_pcioh);
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index eadfa9c6296..9b6c0b5f3b8 100644
--- a/sys/dev/usb/if_aue.c
+++ b/sys/dev/usb/if_aue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_aue.c,v 1.6 2000/07/04 11:44:21 fgsch Exp $ */
+/* $OpenBSD: if_aue.c,v 1.7 2000/08/26 20:08:39 nate Exp $ */
/* $NetBSD: if_aue.c,v 1.38 2000/04/04 20:16:19 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -978,8 +978,12 @@ USB_DETACH(aue)
#if NRND > 0
rnd_detach_source(&sc->rnd_source);
#endif
+#endif
+
mii_detach(&sc->aue_mii, MII_PHY_ANY, MII_OFFSET_ANY);
ifmedia_delete_instance(&sc->aue_mii.mii_media, IFM_INST_ANY);
+
+#if defined(__NetBSD__)
#if NBPFILTER > 0
bpfdetach(ifp);
#endif
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index 5fd97ead99f..4b288daf577 100644
--- a/sys/dev/usb/usb_port.h
+++ b/sys/dev/usb/usb_port.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_port.h,v 1.16 2000/07/04 11:44:25 fgsch Exp $ */
+/* $OpenBSD: usb_port.h,v 1.17 2000/08/26 20:08:39 nate Exp $ */
/* $NetBSD: usb_port.h,v 1.28 2000/03/30 08:53:31 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_port.h,v 1.21 1999/11/17 22:33:47 n_hibma Exp $ */
@@ -229,7 +229,6 @@ __CONCAT(dname,_detach)(self, flags) \
typedef int usb_malloc_type;
-#define mii_attach(x1,x2,x3,x4,x5,x6) mii_phy_probe(x1,x2,x3)
#define Ether_ifattach(ifp, eaddr) ether_ifattach(ifp)
#define if_deactivate(x)
#define IF_INPUT(ifp, m) do { \