summaryrefslogtreecommitdiff
path: root/sys/dev/ic/xl.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-09-20 07:40:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-09-20 07:40:43 +0000
commita8d7c69788c334b14d463ae7d62315f192665c1a (patch)
tree2c4568c37f5dd209be9f93da275f6571a5a0a739 /sys/dev/ic/xl.c
parent6457664f9f4ba52fa78a62ee7a55d34402deef45 (diff)
Stop doing shutdown hooks in network drivers where possible. We already
take all interfaces down, via their xxstop routines. Claudio and I have verified that none of the shutdown hooks do much extra beyond what xxstop was already doing; it is largely a pile of junk. ok claudio, some early comments by sthen; also read by matthew, jsg
Diffstat (limited to 'sys/dev/ic/xl.c')
-rw-r--r--sys/dev/ic/xl.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c
index 2b41113018e..9b2dc60a781 100644
--- a/sys/dev/ic/xl.c
+++ b/sys/dev/ic/xl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xl.c,v 1.96 2010/09/07 16:21:43 deraadt Exp $ */
+/* $OpenBSD: xl.c,v 1.97 2010/09/20 07:40:41 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -163,7 +163,6 @@ void xl_start_90xB(struct ifnet *);
int xl_ioctl(struct ifnet *, u_long, caddr_t);
void xl_freetxrx(struct xl_softc *);
void xl_watchdog(struct ifnet *);
-void xl_shutdown(void *);
int xl_ifmedia_upd(struct ifnet *);
void xl_ifmedia_sts(struct ifnet *, struct ifmediareq *);
@@ -2677,8 +2676,6 @@ xl_attach(struct xl_softc *sc)
*/
if_attach(ifp);
ether_ifattach(ifp);
-
- sc->sc_sdhook = shutdownhook_establish(xl_shutdown, sc);
}
int
@@ -2699,24 +2696,12 @@ xl_detach(struct xl_softc *sc)
/* Delete all remaining media. */
ifmedia_delete_instance(&sc->sc_mii.mii_media, IFM_INST_ANY);
- if (sc->sc_sdhook != NULL)
- shutdownhook_disestablish(sc->sc_sdhook);
-
ether_ifdetach(ifp);
if_detach(ifp);
return (0);
}
-void
-xl_shutdown(void *v)
-{
- struct xl_softc *sc = (struct xl_softc *)v;
-
- xl_reset(sc);
- xl_stop(sc);
-}
-
struct cfdriver xl_cd = {
0, "xl", DV_IFNET
};