diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/aic6915.c | 25 | ||||
-rw-r--r-- | sys/dev/ic/aic6915.h | 3 | ||||
-rw-r--r-- | sys/dev/ic/am7990.c | 16 | ||||
-rw-r--r-- | sys/dev/ic/am7990var.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/an.c | 15 | ||||
-rw-r--r-- | sys/dev/ic/anvar.h | 5 | ||||
-rw-r--r-- | sys/dev/ic/ath.c | 15 | ||||
-rw-r--r-- | sys/dev/ic/athvar.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/atw.c | 21 | ||||
-rw-r--r-- | sys/dev/ic/atwvar.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/dc.c | 18 | ||||
-rw-r--r-- | sys/dev/ic/dcreg.h | 3 | ||||
-rw-r--r-- | sys/dev/ic/fxp.c | 31 | ||||
-rw-r--r-- | sys/dev/ic/fxpvar.h | 3 | ||||
-rw-r--r-- | sys/dev/ic/gem.c | 17 | ||||
-rw-r--r-- | sys/dev/ic/gemvar.h | 3 | ||||
-rw-r--r-- | sys/dev/ic/hme.c | 14 | ||||
-rw-r--r-- | sys/dev/ic/hmevar.h | 3 | ||||
-rw-r--r-- | sys/dev/ic/if_wi.c | 20 | ||||
-rw-r--r-- | sys/dev/ic/if_wivar.h | 3 | ||||
-rw-r--r-- | sys/dev/ic/rtl81x9.c | 15 | ||||
-rw-r--r-- | sys/dev/ic/rtl81x9reg.h | 3 | ||||
-rw-r--r-- | sys/dev/ic/rtw.c | 22 | ||||
-rw-r--r-- | sys/dev/ic/smc83c170.c | 23 | ||||
-rw-r--r-- | sys/dev/ic/smc83c170var.h | 3 | ||||
-rw-r--r-- | sys/dev/pci/if_ath_pci.c | 25 | ||||
-rw-r--r-- | sys/dev/pci/if_re_pci.c | 4 |
27 files changed, 33 insertions, 289 deletions
diff --git a/sys/dev/ic/aic6915.c b/sys/dev/ic/aic6915.c index 4f92d0a389f..9092b53de80 100644 --- a/sys/dev/ic/aic6915.c +++ b/sys/dev/ic/aic6915.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic6915.c,v 1.8 2008/11/28 02:44:17 brad Exp $ */ +/* $OpenBSD: aic6915.c,v 1.9 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: aic6915.c,v 1.15 2005/12/24 20:27:29 perry Exp $ */ /*- @@ -81,8 +81,6 @@ int sf_ioctl(struct ifnet *, u_long, caddr_t); int sf_init(struct ifnet *); void sf_stop(struct ifnet *, int); -void sf_shutdown(void *); - void sf_txintr(struct sf_softc *); void sf_rxintr(struct sf_softc *); void sf_stats_update(struct sf_softc *); @@ -306,14 +304,6 @@ sf_attach(struct sf_softc *sc) */ if_attach(ifp); ether_ifattach(ifp); - - /* - * Make sure the interface is shutdown during reboot. - */ - sc->sc_sdhook = shutdownhook_establish(sf_shutdown, sc); - if (sc->sc_sdhook == NULL) - printf("%s: WARNING: unable to establish shutdown hook\n", - sc->sc_dev.dv_xname); return; /* @@ -345,19 +335,6 @@ sf_attach(struct sf_softc *sc) } /* - * sf_shutdown: - * - * Shutdown hook -- make sure the interface is stopped at reboot. - */ -void -sf_shutdown(void *arg) -{ - struct sf_softc *sc = arg; - - sf_stop(&sc->sc_arpcom.ac_if, 1); -} - -/* * sf_start: [ifnet interface function] * * Start packet transmission on the interface. diff --git a/sys/dev/ic/aic6915.h b/sys/dev/ic/aic6915.h index 149e7ec29ae..b1a13a3db58 100644 --- a/sys/dev/ic/aic6915.h +++ b/sys/dev/ic/aic6915.h @@ -1,4 +1,4 @@ -/* $OpenBSD: aic6915.h,v 1.3 2008/06/26 05:42:15 ray Exp $ */ +/* $OpenBSD: aic6915.h,v 1.4 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: aic6915reg.h,v 1.4 2005/12/11 12:21:25 christos Exp $ */ /*- @@ -763,7 +763,6 @@ struct sf_softc { bus_space_handle_t sc_sh_func; /* sub-handle for func regs */ bus_dma_tag_t sc_dmat; /* bus DMA tag */ struct arpcom sc_arpcom; /* ethernet common data */ - void *sc_sdhook; /* shutdown hook */ int sc_iomapped; /* are we I/O mapped? */ int sc_flags; /* misc. flags */ diff --git a/sys/dev/ic/am7990.c b/sys/dev/ic/am7990.c index 1a05b1a69e0..b98061af829 100644 --- a/sys/dev/ic/am7990.c +++ b/sys/dev/ic/am7990.c @@ -1,4 +1,4 @@ -/* $OpenBSD: am7990.c,v 1.43 2008/11/28 02:44:17 brad Exp $ */ +/* $OpenBSD: am7990.c,v 1.44 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: am7990.c,v 1.22 1996/10/13 01:37:19 christos Exp $ */ /*- @@ -78,8 +78,6 @@ integrate int am7990_put(struct am7990_softc *, int, struct mbuf *); integrate struct mbuf *am7990_get(struct am7990_softc *, int, int); integrate void am7990_read(struct am7990_softc *, int, int); -hide void am7990_shutdown(void *); - #define ifp (&sc->sc_arpcom.ac_if) #if 0 /* XXX what do we do about this?! --thorpej */ @@ -188,10 +186,6 @@ am7990_config(sc) printf("%s: %d receive buffers, %d transmit buffers\n", sc->sc_dev.dv_xname, sc->sc_nrbuf, sc->sc_ntbuf); - sc->sc_sh = shutdownhook_establish(am7990_shutdown, sc); - if (sc->sc_sh == NULL) - panic("am7990_config: can't establish shutdownhook"); - mem = 0; sc->sc_initaddr = mem; mem += sizeof(struct leinit); @@ -914,14 +908,6 @@ am7990_ioctl(ifp, cmd, data) return (error); } -hide void -am7990_shutdown(arg) - void *arg; -{ - - am7990_stop((struct am7990_softc *)arg); -} - #ifdef LEDEBUG void am7990_recv_print(sc, no) diff --git a/sys/dev/ic/am7990var.h b/sys/dev/ic/am7990var.h index 80941de0750..ca58e7b6116 100644 --- a/sys/dev/ic/am7990var.h +++ b/sys/dev/ic/am7990var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: am7990var.h,v 1.9 2002/03/14 01:26:54 millert Exp $ */ +/* $OpenBSD: am7990var.h,v 1.10 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: am7990var.h,v 1.8 1996/07/05 23:57:01 abrown Exp $ */ /* @@ -85,8 +85,6 @@ struct am7990_softc { int sc_hasifmedia; struct ifmedia sc_ifmedia; - void *sc_sh; /* shutdownhook cookie */ - u_int16_t sc_conf3; /* CSR3 value */ void *sc_mem; /* base address of RAM -- CPU's view */ diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c index e2e42000b29..ca8d8864358 100644 --- a/sys/dev/ic/an.c +++ b/sys/dev/ic/an.c @@ -1,4 +1,4 @@ -/* $OpenBSD: an.c,v 1.56 2008/08/27 09:05:03 damien Exp $ */ +/* $OpenBSD: an.c,v 1.57 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: an.c,v 1.34 2005/06/20 02:49:18 atatat Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -346,8 +346,6 @@ an_attach(struct an_softc *sc) sizeof(struct ieee80211_frame) + 64); #endif - sc->sc_sdhook = shutdownhook_establish(an_shutdown, sc); - sc->sc_attached = 1; return(0); @@ -1296,15 +1294,6 @@ an_watchdog(struct ifnet *ifp) ieee80211_watchdog(ifp); } -void -an_shutdown(void *self) -{ - struct an_softc *sc = (struct an_softc *)self; - - if (sc->sc_attached) - an_stop(&sc->sc_ic.ic_if, 1); -} - /* TBD factor with ieee80211_media_change */ int an_media_change(struct ifnet *ifp) @@ -1690,8 +1679,6 @@ an_detach(struct an_softc *sc) ifmedia_delete_instance(&sc->sc_ic.ic_media, IFM_INST_ANY); ieee80211_ifdetach(ifp); if_detach(ifp); - if (sc->sc_sdhook != NULL) - shutdownhook_disestablish(sc->sc_sdhook); splx(s); return 0; } diff --git a/sys/dev/ic/anvar.h b/sys/dev/ic/anvar.h index 2f7d8e9fc10..cabebbb7bc8 100644 --- a/sys/dev/ic/anvar.h +++ b/sys/dev/ic/anvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: anvar.h,v 1.21 2006/02/20 11:13:57 jsg Exp $ */ +/* $OpenBSD: anvar.h,v 1.22 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: anvar.h,v 1.10 2005/02/27 00:27:00 perry Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -115,8 +115,6 @@ struct an_softc { int sc_enabled; int sc_invalid; int sc_attached; - void *sc_sdhook; - int sc_bap_id; int sc_bap_off; @@ -165,7 +163,6 @@ int an_attach(struct an_softc *); int an_detach(struct an_softc *); int an_activate(struct device *, enum devact); void an_power(int, void *); -void an_shutdown(void *); int an_intr(void *); int an_init(struct ifnet *); void an_stop(struct ifnet *, int); diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index bc57aaa0f92..20376840e92 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ath.c,v 1.81 2009/07/31 11:18:09 blambert Exp $ */ +/* $OpenBSD: ath.c,v 1.82 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */ /*- @@ -427,9 +427,6 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) /* * Make sure the interface is shutdown during reboot. */ - sc->sc_sdhook = shutdownhook_establish(ath_shutdown, sc); - if (sc->sc_sdhook == NULL) - printf(": WARNING: unable to establish shutdown hook\n"); sc->sc_powerhook = powerhook_establish(ath_power, sc); if (sc->sc_powerhook == NULL) printf(": WARNING: unable to establish power hook\n"); @@ -484,8 +481,6 @@ ath_detach(struct ath_softc *sc, int flags) splx(s); if (sc->sc_powerhook != NULL) powerhook_disestablish(sc->sc_powerhook); - if (sc->sc_sdhook != NULL) - shutdownhook_disestablish(sc->sc_sdhook); #ifdef __FreeBSD__ ATH_TXBUF_LOCK_DESTROY(sc); ATH_TXQ_LOCK_DESTROY(sc); @@ -552,14 +547,6 @@ ath_resume(struct ath_softc *sc, int why) } } -void -ath_shutdown(void *arg) -{ - struct ath_softc *sc = arg; - - ath_stop(&sc->sc_ic.ic_if); -} - int ath_intr(void *arg) { diff --git a/sys/dev/ic/athvar.h b/sys/dev/ic/athvar.h index bf3d173abe2..b30e93f0716 100644 --- a/sys/dev/ic/athvar.h +++ b/sys/dev/ic/athvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: athvar.h,v 1.26 2009/07/24 17:22:37 jsg Exp $ */ +/* $OpenBSD: athvar.h,v 1.27 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: athvar.h,v 1.10 2004/08/10 01:03:53 dyoung Exp $ */ /*- @@ -307,7 +307,6 @@ struct ath_softc { HAL_MIB_STATS sc_mib_stats; /* MIB counter statistics */ #ifndef __FreeBSD__ - void *sc_sdhook; /* shutdown hook */ void *sc_powerhook; /* power management hook */ u_int sc_flags; /* misc flags */ #endif @@ -414,7 +413,6 @@ void ath_suspend(struct ath_softc *, int); int ath_activate(struct device *, enum devact); void ath_power(int, void *); #endif -void ath_shutdown(void *); int ath_intr(void *); int ath_enable(struct ath_softc *); diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c index e89266a523e..d613ec23642 100644 --- a/sys/dev/ic/atw.c +++ b/sys/dev/ic/atw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atw.c,v 1.66 2009/06/03 20:00:36 deraadt Exp $ */ +/* $OpenBSD: atw.c,v 1.67 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */ /*- @@ -843,14 +843,6 @@ atw_attach(struct atw_softc *sc) #endif /* - * Make sure the interface is shutdown during reboot. - */ - sc->sc_sdhook = shutdownhook_establish(atw_shutdown, sc); - if (sc->sc_sdhook == NULL) - printf("%s: WARNING: unable to establish shutdown hook\n", - sc->sc_dev.dv_xname); - - /* * Add a suspend hook to make sure we come back up after a * resume. */ @@ -2757,8 +2749,6 @@ atw_detach(struct atw_softc *sc) sizeof(struct atw_control_data)); bus_dmamem_free(sc->sc_dmat, &sc->sc_cdseg, sc->sc_cdnseg); - if (sc->sc_sdhook != NULL) - shutdownhook_disestablish(sc->sc_sdhook); if (sc->sc_powerhook != NULL) powerhook_disestablish(sc->sc_powerhook); @@ -2768,15 +2758,6 @@ atw_detach(struct atw_softc *sc) return (0); } -/* atw_shutdown: make sure the interface is stopped at reboot time. */ -void -atw_shutdown(void *arg) -{ - struct atw_softc *sc = arg; - - atw_stop(&sc->sc_ic.ic_if, 1); -} - int atw_intr(void *arg) { diff --git a/sys/dev/ic/atwvar.h b/sys/dev/ic/atwvar.h index b3fcc5f9cd2..a8be9ed36a7 100644 --- a/sys/dev/ic/atwvar.h +++ b/sys/dev/ic/atwvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atwvar.h,v 1.17 2009/06/03 20:00:36 deraadt Exp $ */ +/* $OpenBSD: atwvar.h,v 1.18 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: atwvar.h,v 1.13 2004/07/23 07:07:55 dyoung Exp $ */ /* @@ -195,7 +195,6 @@ struct atw_softc { bus_space_handle_t sc_sh; /* bus space handle */ bus_size_t sc_mapsize; /* mapping size */ bus_dma_tag_t sc_dmat; /* bus dma tag */ - void *sc_sdhook; /* shutdown hook */ void *sc_powerhook; /* power management hook */ u_int32_t sc_cacheline; /* cache line size */ u_int32_t sc_maxburst; /* maximum burst length */ @@ -440,6 +439,5 @@ int atw_activate(struct device *, enum devact); int atw_intr(void *arg); int atw_enable(struct atw_softc *); void atw_power(int, void *); -void atw_shutdown(void *); #endif /* _DEV_IC_ATWVAR_H_ */ diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index 3c4701be4ba..c992cb13613 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.111 2009/06/26 19:11:17 deraadt Exp $ */ +/* $OpenBSD: dc.c,v 1.112 2009/08/10 20:29:54 deraadt Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -130,7 +130,6 @@ #include <dev/ic/dcreg.h> int dc_intr(void *); -void dc_shutdown(void *); void dc_power(int, void *); struct dc_type *dc_devtype(void *); int dc_newbuf(struct dc_softc *, int, struct mbuf *); @@ -1818,7 +1817,6 @@ hasmac: if_attach(ifp); ether_ifattach(ifp); - sc->sc_dhook = shutdownhook_establish(dc_shutdown, sc); sc->sc_pwrhook = powerhook_establish(dc_power, sc); fail: @@ -3124,18 +3122,6 @@ dc_stop(struct dc_softc *sc) BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); } -/* - * Stop all chip I/O so that the kernel's probe routines don't - * get confused by errant DMAs when rebooting. - */ -void -dc_shutdown(void *v) -{ - struct dc_softc *sc = (struct dc_softc *)v; - - dc_stop(sc); -} - void dc_power(int why, void *arg) { @@ -3170,8 +3156,6 @@ dc_detach(struct dc_softc *sc) ether_ifdetach(ifp); if_detach(ifp); - if (sc->sc_dhook != NULL) - shutdownhook_disestablish(sc->sc_dhook); if (sc->sc_pwrhook != NULL) powerhook_disestablish(sc->sc_pwrhook); diff --git a/sys/dev/ic/dcreg.h b/sys/dev/ic/dcreg.h index d86887ea2f7..81f840dfbfe 100644 --- a/sys/dev/ic/dcreg.h +++ b/sys/dev/ic/dcreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dcreg.h,v 1.44 2008/09/03 19:29:48 brad Exp $ */ +/* $OpenBSD: dcreg.h,v 1.45 2009/08/10 20:29:54 deraadt Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -723,7 +723,6 @@ 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; void *sc_pwrhook; u_int8_t dc_type; u_int8_t dc_pmode; diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index c93f9622293..4e55e1840d3 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.96 2009/06/06 02:49:39 naddy Exp $ */ +/* $OpenBSD: fxp.c,v 1.97 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -284,7 +284,6 @@ fxp_write_eeprom(struct fxp_softc *sc, u_short *data, int offset, int words) * Operating system-specific autoconfiguration glue *************************************************************/ -void fxp_shutdown(void *); void fxp_power(int, void *); struct cfdriver fxp_cd = { @@ -292,21 +291,10 @@ struct cfdriver fxp_cd = { }; /* - * Device shutdown routine. Called at system shutdown after sync. The - * main purpose of this routine is to shut off receiver DMA so that - * kernel memory doesn't get clobbered during warmboot. - */ -void -fxp_shutdown(void *sc) -{ - fxp_stop((struct fxp_softc *) sc, 0); -} - -/* * Power handler routine. Called when the system is transitioning - * into/out of power save modes. As with fxp_shutdown, the main - * purpose of this routine is to shut off receiver DMA so it doesn't - * clobber kernel memory at the wrong time. + * into/out of power save modes. The main purpose of this routine + * is to shut off receiver DMA so it doesn't clobber kernel memory + * at the wrong time. */ void fxp_power(int why, void *arg) @@ -510,15 +498,10 @@ fxp_attach(struct fxp_softc *sc, const char *intrstr) ether_ifattach(ifp); /* - * Add shutdown hook so that DMA is disabled prior to reboot. Not + * Add power hook, so that DMA is disabled prior to reboot. Not * doing so could allow DMA to corrupt kernel memory during the * reboot before the driver initializes. */ - sc->sc_sdhook = shutdownhook_establish(fxp_shutdown, sc); - - /* - * Add suspend hook, for similiar reasons.. - */ sc->sc_powerhook = powerhook_establish(fxp_power, sc); /* @@ -1070,8 +1053,6 @@ fxp_detach(struct fxp_softc *sc) ether_ifdetach(ifp); if_detach(ifp); - if (sc->sc_sdhook != NULL) - shutdownhook_disestablish(sc->sc_sdhook); if (sc->sc_powerhook != NULL) powerhook_disestablish(sc->sc_powerhook); @@ -1090,7 +1071,7 @@ fxp_stop(struct fxp_softc *sc, int drain) /* * Turn down interface (done early to avoid bad interactions - * between panics, shutdown hooks, and the watchdog timer) + * between panics, and the watchdog timer) */ ifp->if_timer = 0; ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); diff --git a/sys/dev/ic/fxpvar.h b/sys/dev/ic/fxpvar.h index e88d580ec8c..161dfbcde33 100644 --- a/sys/dev/ic/fxpvar.h +++ b/sys/dev/ic/fxpvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fxpvar.h,v 1.29 2009/06/02 16:50:20 jsg Exp $ */ +/* $OpenBSD: fxpvar.h,v 1.30 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: if_fxpvar.h,v 1.1 1997/06/05 02:01:58 thorpej Exp $ */ /* @@ -127,7 +127,6 @@ struct fxp_softc { int phy_10Mbps_only; /* PHY is 10Mbps-only device */ int eeprom_size; /* size of serial EEPROM */ int rx_bufs; /* how many rx buffers allocated? */ - void *sc_sdhook; /* shutdownhook */ void *sc_powerhook; /* powerhook */ struct fxp_txsw txs[FXP_NTXCB]; struct fxp_txsw *sc_cbt_cons, *sc_cbt_prod, *sc_cbt_prev; diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c index 9a02283a960..66fb6368eb1 100644 --- a/sys/dev/ic/gem.c +++ b/sys/dev/ic/gem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gem.c,v 1.94 2009/08/09 11:40:58 deraadt Exp $ */ +/* $OpenBSD: gem.c,v 1.95 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */ /* @@ -84,7 +84,6 @@ void gem_stop(struct ifnet *); int gem_ioctl(struct ifnet *, u_long, caddr_t); void gem_tick(void *); void gem_watchdog(struct ifnet *); -void gem_shutdown(void *); int gem_init(struct ifnet *); void gem_init_regs(struct gem_softc *); int gem_ringsize(int); @@ -346,10 +345,6 @@ gem_config(struct gem_softc *sc) if_attach(ifp); ether_ifattach(ifp); - sc->sc_sh = shutdownhook_establish(gem_shutdown, sc); - if (sc->sc_sh == NULL) - panic("gem_config: can't establish shutdownhook"); - timeout_set(&sc->sc_tick_ch, gem_tick, sc); timeout_set(&sc->sc_rx_watchdog, gem_rx_watchdog, sc); return; @@ -1497,16 +1492,6 @@ gem_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) return (error); } - -void -gem_shutdown(void *arg) -{ - struct gem_softc *sc = (struct gem_softc *)arg; - struct ifnet *ifp = &sc->sc_arpcom.ac_if; - - gem_stop(ifp); -} - void gem_iff(struct gem_softc *sc) { diff --git a/sys/dev/ic/gemvar.h b/sys/dev/ic/gemvar.h index 0acaae0e678..894e858d07c 100644 --- a/sys/dev/ic/gemvar.h +++ b/sys/dev/ic/gemvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: gemvar.h,v 1.21 2009/03/22 21:46:31 kettenis Exp $ */ +/* $OpenBSD: gemvar.h,v 1.22 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: gemvar.h,v 1.1 2001/09/16 00:11:43 eeh Exp $ */ /* @@ -155,7 +155,6 @@ struct gem_softc { #define GEM_GIGABIT 0x0001 /* has a gigabit PHY */ - void *sc_sdhook; /* shutdown hook */ void *sc_powerhook; /* power management hook */ struct gem_stats sc_stats; /* debugging stats */ diff --git a/sys/dev/ic/hme.c b/sys/dev/ic/hme.c index 3c5a9413a59..bf0cee0d677 100644 --- a/sys/dev/ic/hme.c +++ b/sys/dev/ic/hme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hme.c,v 1.59 2009/08/09 11:40:58 deraadt Exp $ */ +/* $OpenBSD: hme.c,v 1.60 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: hme.c,v 1.21 2001/07/07 15:59:37 thorpej Exp $ */ /*- @@ -87,7 +87,6 @@ void hme_stop(struct hme_softc *); int hme_ioctl(struct ifnet *, u_long, caddr_t); void hme_tick(void *); void hme_watchdog(struct ifnet *); -void hme_shutdown(void *); void hme_init(struct hme_softc *); void hme_meminit(struct hme_softc *); void hme_mifinit(struct hme_softc *); @@ -294,10 +293,6 @@ hme_config(sc) if_attach(ifp); ether_ifattach(ifp); - sc->sc_sh = shutdownhook_establish(hme_shutdown, sc); - if (sc->sc_sh == NULL) - panic("hme_config: can't establish shutdownhook"); - timeout_set(&sc->sc_tick_ch, hme_tick, sc); return; @@ -1326,13 +1321,6 @@ hme_ioctl(ifp, cmd, data) } void -hme_shutdown(arg) - void *arg; -{ - hme_stop((struct hme_softc *)arg); -} - -void hme_iff(struct hme_softc *sc) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; diff --git a/sys/dev/ic/hmevar.h b/sys/dev/ic/hmevar.h index 6194eafa0c8..06076d4c763 100644 --- a/sys/dev/ic/hmevar.h +++ b/sys/dev/ic/hmevar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hmevar.h,v 1.13 2009/06/11 22:37:58 sthen Exp $ */ +/* $OpenBSD: hmevar.h,v 1.14 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: hmevar.h,v 1.6 2000/09/28 10:56:57 tsutsui Exp $ */ /*- @@ -79,7 +79,6 @@ struct hme_softc { struct hme_ring sc_rb; int sc_debug; - void *sc_sh; /* shutdownhook cookie */ /* Special hardware hooks */ void (*sc_hwreset)(struct hme_softc *); diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c index ea18da0516e..59b8fd8b6df 100644 --- a/sys/dev/ic/if_wi.c +++ b/sys/dev/ic/if_wi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi.c,v 1.144 2009/06/03 20:35:37 beck Exp $ */ +/* $OpenBSD: if_wi.c,v 1.145 2009/08/10 20:29:54 deraadt Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -126,7 +126,7 @@ u_int32_t widebug = WIDEBUG; #if !defined(lint) && !defined(__OpenBSD__) static const char rcsid[] = - "$OpenBSD: if_wi.c,v 1.144 2009/06/03 20:35:37 beck Exp $"; + "$OpenBSD: if_wi.c,v 1.145 2009/08/10 20:29:54 deraadt Exp $"; #endif /* lint */ #ifdef foo @@ -138,7 +138,6 @@ STATIC int wi_ioctl(struct ifnet *, u_long, caddr_t); STATIC void wi_init_io(struct wi_softc *); STATIC void wi_start(struct ifnet *); STATIC void wi_watchdog(struct ifnet *); -STATIC void wi_shutdown(void *); STATIC void wi_rxeof(struct wi_softc *); STATIC void wi_txeof(struct wi_softc *, int); STATIC void wi_update_stats(struct wi_softc *); @@ -446,8 +445,6 @@ wi_attach(struct wi_softc *sc, struct wi_funcs *funcs) BPFATTACH(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); #endif - sc->sc_sdhook = shutdownhook_establish(wi_shutdown, sc); - if_addgroup(ifp, "wlan"); ifp->if_priority = IF_WIRELESS_DEFAULT_PRIORITY; @@ -2605,23 +2602,10 @@ wi_detach(struct wi_softc *sc) if (sc->wi_flags & WI_FLAGS_ATTACHED) { sc->wi_flags &= ~WI_FLAGS_ATTACHED; - if (sc->sc_sdhook != NULL) - shutdownhook_disestablish(sc->sc_sdhook); } } STATIC void -wi_shutdown(void *arg) -{ - struct wi_softc *sc; - - sc = arg; - wi_stop(sc); - - return; -} - -STATIC void wi_get_id(struct wi_softc *sc) { struct wi_ltv_ver ver; diff --git a/sys/dev/ic/if_wivar.h b/sys/dev/ic/if_wivar.h index 856a7d16bef..6a316e9bba6 100644 --- a/sys/dev/ic/if_wivar.h +++ b/sys/dev/ic/if_wivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wivar.h,v 1.28 2006/06/27 09:48:02 reyk Exp $ */ +/* $OpenBSD: if_wivar.h,v 1.29 2009/08/10 20:29:54 deraadt Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -112,7 +112,6 @@ struct wi_softc { u_int16_t wi_confbits; u_int16_t wi_confbits_param0; } wi_debug; - void *sc_sdhook; struct wi_usb_softc *wi_usb_cdata; struct wi_funcs *sc_funcs; diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c index da531faf61e..a8e3a906527 100644 --- a/sys/dev/ic/rtl81x9.c +++ b/sys/dev/ic/rtl81x9.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtl81x9.c,v 1.66 2009/07/21 07:30:18 sthen Exp $ */ +/* $OpenBSD: rtl81x9.c,v 1.67 2009/08/10 20:29:54 deraadt Exp $ */ /* * Copyright (c) 1997, 1998 @@ -130,7 +130,6 @@ */ void rl_tick(void *); -void rl_shutdown(void *); void rl_powerhook(int, void *); int rl_encap(struct rl_softc *, struct mbuf * ); @@ -1279,22 +1278,12 @@ rl_attach(sc) if_attach(ifp); ether_ifattach(ifp); - sc->sc_sdhook = shutdownhook_establish(rl_shutdown, sc); sc->sc_pwrhook = powerhook_establish(rl_powerhook, sc); return (0); } void -rl_shutdown(arg) - void *arg; -{ - struct rl_softc *sc = (struct rl_softc *)arg; - - rl_stop(sc); -} - -void rl_powerhook(why, arg) int why; void *arg; @@ -1436,8 +1425,6 @@ rl_detach(struct rl_softc *sc) ether_ifdetach(ifp); if_detach(ifp); - if (sc->sc_sdhook != NULL) - shutdownhook_disestablish(sc->sc_sdhook); if (sc->sc_pwrhook != NULL) powerhook_disestablish(sc->sc_pwrhook); diff --git a/sys/dev/ic/rtl81x9reg.h b/sys/dev/ic/rtl81x9reg.h index 3b78f4625bf..f30d3d7a148 100644 --- a/sys/dev/ic/rtl81x9reg.h +++ b/sys/dev/ic/rtl81x9reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rtl81x9reg.h,v 1.66 2009/07/23 20:15:32 kettenis Exp $ */ +/* $OpenBSD: rtl81x9reg.h,v 1.67 2009/08/10 20:29:54 deraadt Exp $ */ /* * Copyright (c) 1997, 1998 @@ -807,7 +807,6 @@ struct rl_softc { int rl_eecmd_read; int rl_eewidth; int rl_bus_speed; - void *sc_sdhook; /* shutdownhook */ void *sc_pwrhook; int rl_txthresh; struct rl_chain_data rl_cdata; diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c index 53d6f72da68..bbd26d5ec4d 100644 --- a/sys/dev/ic/rtw.c +++ b/sys/dev/ic/rtw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtw.c,v 1.74 2009/07/28 11:45:05 blambert Exp $ */ +/* $OpenBSD: rtw.c,v 1.75 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: rtw.c,v 1.29 2004/12/27 19:49:16 dyoung Exp $ */ /*- @@ -3624,28 +3624,11 @@ rtw_power(int why, void *arg) splx(s); } -/* rtw_shutdown: make sure the interface is stopped at reboot time. */ -void -rtw_shutdown(void *arg) -{ - struct rtw_softc *sc = arg; - - rtw_stop(&sc->sc_ic.ic_if, 1); -} - void rtw_establish_hooks(struct rtw_hooks *hooks, const char *dvname, void *arg) { /* - * Make sure the interface is shutdown during reboot. - */ - hooks->rh_shutdown = shutdownhook_establish(rtw_shutdown, arg); - if (hooks->rh_shutdown == NULL) - printf("%s: WARNING: unable to establish shutdown hook\n", - dvname); - - /* * Add a suspend hook to make sure we come back up after a * resume. */ @@ -3659,9 +3642,6 @@ void rtw_disestablish_hooks(struct rtw_hooks *hooks, const char *dvname, void *arg) { - if (hooks->rh_shutdown != NULL) - shutdownhook_disestablish(hooks->rh_shutdown); - if (hooks->rh_power != NULL) powerhook_disestablish(hooks->rh_power); } diff --git a/sys/dev/ic/smc83c170.c b/sys/dev/ic/smc83c170.c index b7cc0377720..a8805595786 100644 --- a/sys/dev/ic/smc83c170.c +++ b/sys/dev/ic/smc83c170.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smc83c170.c,v 1.13 2008/11/28 02:44:17 brad Exp $ */ +/* $OpenBSD: smc83c170.c,v 1.14 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: smc83c170.c,v 1.59 2005/02/27 00:27:02 perry Exp $ */ /*- @@ -81,8 +81,6 @@ int epic_ioctl(struct ifnet *, u_long, caddr_t); int epic_init(struct ifnet *); void epic_stop(struct ifnet *, int); -void epic_shutdown(void *); - void epic_reset(struct epic_softc *); void epic_rxdrain(struct epic_softc *); int epic_add_rxbuf(struct epic_softc *, int); @@ -296,14 +294,6 @@ epic_attach(struct epic_softc *sc, const char *intrstr) */ if_attach(ifp); ether_ifattach(ifp); - - /* - * Make sure the interface is shutdown during reboot. - */ - sc->sc_sdhook = shutdownhook_establish(epic_shutdown, sc); - if (sc->sc_sdhook == NULL) - printf("%s: WARNING: unable to establish shutdown hook\n", - sc->sc_dev.dv_xname); return; /* @@ -337,17 +327,6 @@ epic_attach(struct epic_softc *sc, const char *intrstr) } /* - * Shutdown hook. Make sure the interface is stopped at reboot. - */ -void -epic_shutdown(void *arg) -{ - struct epic_softc *sc = arg; - - epic_stop(&sc->sc_arpcom.ac_if, 1); -} - -/* * Start packet transmission on the interface. * [ifnet interface function] */ diff --git a/sys/dev/ic/smc83c170var.h b/sys/dev/ic/smc83c170var.h index c557296b5e7..bd59a495c2e 100644 --- a/sys/dev/ic/smc83c170var.h +++ b/sys/dev/ic/smc83c170var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smc83c170var.h,v 1.2 2008/06/26 05:42:16 ray Exp $ */ +/* $OpenBSD: smc83c170var.h,v 1.3 2009/08/10 20:29:54 deraadt Exp $ */ /* $NetBSD: smc83c170var.h,v 1.9 2005/02/04 02:10:37 perry Exp $ */ /*- @@ -99,7 +99,6 @@ struct epic_softc { bus_space_handle_t sc_sh; /* bus space handle */ bus_dma_tag_t sc_dmat; /* bus DMA tag */ struct arpcom sc_arpcom; /* ethernet common data */ - void *sc_sdhook; /* shutdown hook */ int sc_hwflags; /* info about board */ #define EPIC_HAS_BNC 0x01 /* BNC on serial interface */ diff --git a/sys/dev/pci/if_ath_pci.c b/sys/dev/pci/if_ath_pci.c index a9fec524218..f267bb4304a 100644 --- a/sys/dev/pci/if_ath_pci.c +++ b/sys/dev/pci/if_ath_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ath_pci.c,v 1.19 2009/03/29 21:53:52 sthen Exp $ */ +/* $OpenBSD: if_ath_pci.c,v 1.20 2009/08/10 20:29:52 deraadt Exp $ */ /* $NetBSD: if_ath_pci.c,v 1.7 2004/06/30 05:58:17 mycroft Exp $ */ /*- @@ -83,7 +83,6 @@ struct ath_pci_softc { pcitag_t sc_pcitag; void *sc_ih; /* Interrupt handler. */ - void *sc_sdhook; /* Shutdown hook. */ }; /* Base Address Register */ @@ -91,7 +90,6 @@ struct ath_pci_softc { int ath_pci_match(struct device *, void *, void *); void ath_pci_attach(struct device *, struct device *, void *); -void ath_pci_shutdown(void *); int ath_pci_detach(struct device *, int); struct cfattach ath_pci_ca = { @@ -177,17 +175,9 @@ ath_pci_attach(struct device *parent, struct device *self, void *aux) sc->sc_dmat = pa->pa_dmat; - psc->sc_sdhook = shutdownhook_establish(ath_pci_shutdown, psc); - if (psc->sc_sdhook == NULL) { - printf(": can't establish shutdown hook\n"); - goto deintr; - } - if (ath_attach(PCI_PRODUCT(pa->pa_id), sc) == 0) return; - shutdownhook_disestablish(psc->sc_sdhook); -deintr: pci_intr_disestablish(pc, psc->sc_ih); unmap: bus_space_unmap(sc->sc_st, sc->sc_sh, sc->sc_ss); @@ -208,11 +198,6 @@ ath_pci_detach(struct device *self, int flags) psc->sc_ih = NULL; } - if (psc->sc_sdhook != NULL) { - shutdownhook_disestablish(psc->sc_sdhook); - psc->sc_sdhook = NULL; - } - if (sc->sc_ss != 0) { bus_space_unmap(sc->sc_st, sc->sc_sh, sc->sc_ss); sc->sc_ss = 0; @@ -220,11 +205,3 @@ ath_pci_detach(struct device *self, int flags) return (0); } - -void -ath_pci_shutdown(void *self) -{ - struct ath_pci_softc *psc = (struct ath_pci_softc *)self; - - ath_shutdown(&psc->sc_sc); -} diff --git a/sys/dev/pci/if_re_pci.c b/sys/dev/pci/if_re_pci.c index 8cd6b5415b6..0e2a0ade841 100644 --- a/sys/dev/pci/if_re_pci.c +++ b/sys/dev/pci/if_re_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_re_pci.c,v 1.24 2009/01/22 19:26:07 kettenis Exp $ */ +/* $OpenBSD: if_re_pci.c,v 1.25 2009/08/10 20:29:52 deraadt Exp $ */ /* * Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org> @@ -225,8 +225,6 @@ re_pci_detach(struct device *self, int flags) if_detach(ifp); /* No more hooks */ - if (sc->sc_sdhook != NULL) - shutdownhook_disestablish(sc->sc_sdhook); if (sc->sc_pwrhook != NULL) powerhook_disestablish(sc->sc_pwrhook); |