aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ex
diff options
context:
space:
mode:
authorMatthew N. Dodd <mdodd@FreeBSD.org>2003-03-29 15:34:26 +0000
committerMatthew N. Dodd <mdodd@FreeBSD.org>2003-03-29 15:34:26 +0000
commitc0a71ab74ae7c2f8f570fd8f1a5f2534762d6c51 (patch)
treeac242e11de87bfe07741aa6fd6aa07333d56d7bc /sys/dev/ex
parentece0c30b62b3285cf96735441e837723ac9f1bd2 (diff)
Notes
Diffstat (limited to 'sys/dev/ex')
-rw-r--r--sys/dev/ex/if_ex.c19
-rw-r--r--sys/dev/ex/if_ex_isa.c1
-rw-r--r--sys/dev/ex/if_ex_pccard.c16
-rw-r--r--sys/dev/ex/if_exvar.h1
4 files changed, 22 insertions, 15 deletions
diff --git a/sys/dev/ex/if_ex.c b/sys/dev/ex/if_ex.c
index 69f0c16a7d93..ac05a381aa5a 100644
--- a/sys/dev/ex/if_ex.c
+++ b/sys/dev/ex/if_ex.c
@@ -275,6 +275,25 @@ ex_attach(device_t dev)
return(0);
}
+int
+ex_detach (device_t dev)
+{
+ struct ex_softc *sc;
+ struct ifnet *ifp;
+
+ sc = device_get_softc(dev);
+ ifp = &sc->arpcom.ac_if;
+
+ ex_stop(sc);
+
+ ifp->if_flags &= ~IFF_RUNNING;
+ ether_ifdetach(ifp);
+
+ ex_release_resources(dev);
+
+ return (0);
+}
+
static void
ex_init(void *xsc)
{
diff --git a/sys/dev/ex/if_ex_isa.c b/sys/dev/ex/if_ex_isa.c
index 88607957491c..13d9d9be3c48 100644
--- a/sys/dev/ex/if_ex_isa.c
+++ b/sys/dev/ex/if_ex_isa.c
@@ -65,6 +65,7 @@ static device_method_t ex_methods[] = {
DEVMETHOD(device_identify, ex_isa_identify),
DEVMETHOD(device_probe, ex_isa_probe),
DEVMETHOD(device_attach, ex_isa_attach),
+ DEVMETHOD(device_detach, ex_detach),
{ 0, 0 }
};
diff --git a/sys/dev/ex/if_ex_pccard.c b/sys/dev/ex/if_ex_pccard.c
index 3f88fed0123f..7087cf52bacc 100644
--- a/sys/dev/ex/if_ex_pccard.c
+++ b/sys/dev/ex/if_ex_pccard.c
@@ -51,13 +51,12 @@
/* Bus Front End Functions */
static int ex_pccard_probe (device_t);
static int ex_pccard_attach (device_t);
-static int ex_pccard_detach (device_t);
static device_method_t ex_pccard_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, ex_pccard_probe),
DEVMETHOD(device_attach, ex_pccard_attach),
- DEVMETHOD(device_detach, ex_pccard_detach),
+ DEVMETHOD(device_detach, ex_detach),
{ 0, 0 }
};
@@ -147,16 +146,3 @@ bad:
ex_release_resources(dev);
return (error);
}
-
-static int
-ex_pccard_detach(device_t dev)
-{
- struct ex_softc *sc = device_get_softc(dev);
- struct ifnet *ifp = &sc->arpcom.ac_if;
-
- ex_stop(sc);
- ifp->if_flags &= ~IFF_RUNNING;
- if_detach(ifp);
- ex_release_resources(dev);
- return (0);
-}
diff --git a/sys/dev/ex/if_exvar.h b/sys/dev/ex/if_exvar.h
index 840305dd558c..6539b85c98dc 100644
--- a/sys/dev/ex/if_exvar.h
+++ b/sys/dev/ex/if_exvar.h
@@ -75,6 +75,7 @@ extern u_char plus_ee2irqmap[];
int ex_alloc_resources (device_t);
void ex_release_resources (device_t);
int ex_attach (device_t);
+int ex_detach (device_t);
driver_intr_t ex_intr;