diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-04-13 15:55:17 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-04-13 15:55:17 +0000 |
commit | 132facd7e50065a152cfc266756dc5c25fd01fff (patch) | |
tree | beef836cd05cb3ae89363cfb48395e428ef2cb91 /sys | |
parent | 2acd7b641c8f7ea87f33c237b14c6d84d7a4d1d4 (diff) |
Disestablish the shutdownhook on detach.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/dc.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/dcreg.h | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index 761c1c5b53f..9316dd2c91d 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.25 2001/04/06 17:14:13 aaron Exp $ */ +/* $OpenBSD: dc.c,v 1.26 2001/04/13 15:55:16 aaron Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1723,7 +1723,7 @@ void dc_attach(sc) if_attach(ifp); ether_ifattach(ifp); - shutdownhook_establish(dc_shutdown, sc); + sc->sc_dhook = shutdownhook_establish(dc_shutdown, sc); fail: return; @@ -1745,6 +1745,8 @@ int dc_detach(sc) ether_ifdetach(ifp); if_detach(ifp); + shutdownhook_disestablish(sc->sc_dhook); + return (0); } @@ -2706,7 +2708,9 @@ void dc_init(xsc) DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_RX_ON); CSR_WRITE_4(sc, DC_RXSTART, 0xFFFFFFFF); +#if 0 mii_mediachg(mii); +#endif dc_setcfg(sc, sc->dc_if_media); ifp->if_flags |= IFF_RUNNING; diff --git a/sys/dev/ic/dcreg.h b/sys/dev/ic/dcreg.h index f03436c6336..53879f8fcac 100644 --- a/sys/dev/ic/dcreg.h +++ b/sys/dev/ic/dcreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dcreg.h,v 1.12 2001/04/06 17:14:14 aaron Exp $ */ +/* $OpenBSD: dcreg.h,v 1.13 2001/04/13 15:55:16 aaron Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -677,6 +677,7 @@ struct dc_softc { bus_space_handle_t dc_bhandle; /* bus space handle */ bus_space_tag_t dc_btag; /* bus space tag */ void *dc_intrhand; + void *sc_dhook; struct resource *dc_irq; struct resource *dc_res; u_int8_t dc_unit; /* interface number */ |