diff options
author | Pyun YongHyeon <yongari@FreeBSD.org> | 2007-11-22 02:45:00 +0000 |
---|---|---|
committer | Pyun YongHyeon <yongari@FreeBSD.org> | 2007-11-22 02:45:00 +0000 |
commit | 6a087a8722f8f5730da0236d0656ed363b8f87b3 (patch) | |
tree | d1d19f54c55bb9daf8443358fe00c8ae2018ba6b /sys/dev | |
parent | e7356456ed980db73b21df22d5405c1aaeeca003 (diff) | |
download | src-6a087a8722f8f5730da0236d0656ed363b8f87b3.tar.gz src-6a087a8722f8f5730da0236d0656ed363b8f87b3.zip |
Fix function prototype for device_shutdown method.
Notes
Notes:
svn path=/head/; revision=173839
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/bce/if_bce.c | 8 | ||||
-rw-r--r-- | sys/dev/bfe/if_bfe.c | 7 | ||||
-rw-r--r-- | sys/dev/dc/if_dc.c | 6 | ||||
-rw-r--r-- | sys/dev/lge/if_lge.c | 6 | ||||
-rw-r--r-- | sys/dev/msk/if_msk.c | 5 | ||||
-rw-r--r-- | sys/dev/nfe/if_nfe.c | 6 | ||||
-rw-r--r-- | sys/dev/nge/if_nge.c | 6 | ||||
-rw-r--r-- | sys/dev/nve/if_nve.c | 6 | ||||
-rw-r--r-- | sys/dev/re/if_re.c | 6 | ||||
-rw-r--r-- | sys/dev/sf/if_sf.c | 6 | ||||
-rw-r--r-- | sys/dev/sk/if_sk.c | 6 | ||||
-rw-r--r-- | sys/dev/stge/if_stge.c | 6 | ||||
-rw-r--r-- | sys/dev/ti/if_ti.c | 6 | ||||
-rw-r--r-- | sys/dev/vge/if_vge.c | 6 | ||||
-rw-r--r-- | sys/dev/vr/if_vr.c | 6 | ||||
-rw-r--r-- | sys/dev/vx/if_vx_pci.c | 6 |
16 files changed, 61 insertions, 37 deletions
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c index d9ebc6e0f946..e50229f2db37 100644 --- a/sys/dev/bce/if_bce.c +++ b/sys/dev/bce/if_bce.c @@ -211,7 +211,7 @@ static struct flash_spec flash_table[] = static int bce_probe (device_t); static int bce_attach (device_t); static int bce_detach (device_t); -static void bce_shutdown (device_t); +static int bce_shutdown (device_t); /****************************************************************************/ @@ -915,9 +915,9 @@ bce_detach(device_t dev) /* Stops and resets the controller. */ /* */ /* Returns: */ -/* Nothing */ +/* 0 on success, positive value on failure. */ /****************************************************************************/ -static void +static int bce_shutdown(device_t dev) { struct bce_softc *sc = device_get_softc(dev); @@ -935,6 +935,8 @@ bce_shutdown(device_t dev) BCE_UNLOCK(sc); DBPRINT(sc, BCE_VERBOSE_SPECIAL, "Exiting %s()\n", __FUNCTION__); + + return (0); } diff --git a/sys/dev/bfe/if_bfe.c b/sys/dev/bfe/if_bfe.c index b88a6bd3de3b..396ae45fe52c 100644 --- a/sys/dev/bfe/if_bfe.c +++ b/sys/dev/bfe/if_bfe.c @@ -98,7 +98,7 @@ static void bfe_init (void *); static void bfe_init_locked (void *); static void bfe_stop (struct bfe_softc *); static void bfe_watchdog (struct ifnet *); -static void bfe_shutdown (device_t); +static int bfe_shutdown (device_t); static void bfe_tick (void *); static void bfe_txeof (struct bfe_softc *); static void bfe_rxeof (struct bfe_softc *); @@ -470,7 +470,7 @@ bfe_detach(device_t dev) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void +static int bfe_shutdown(device_t dev) { struct bfe_softc *sc; @@ -480,7 +480,8 @@ bfe_shutdown(device_t dev) bfe_stop(sc); BFE_UNLOCK(sc); - return; + + return (0); } static int diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index e3d946526b6f..0276cfe31729 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -248,7 +248,7 @@ static void dc_init(void *); static void dc_init_locked(struct dc_softc *); static void dc_stop(struct dc_softc *); static void dc_watchdog(void *); -static void dc_shutdown(device_t); +static int dc_shutdown(device_t); static int dc_ifmedia_upd(struct ifnet *); static void dc_ifmedia_sts(struct ifnet *, struct ifmediareq *); @@ -3761,7 +3761,7 @@ dc_resume(device_t dev) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void +static int dc_shutdown(device_t dev) { struct dc_softc *sc; @@ -3771,4 +3771,6 @@ dc_shutdown(device_t dev) DC_LOCK(sc); dc_stop(sc); DC_UNLOCK(sc); + + return (0); } diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c index e09134c80917..0f3dc2d0d55f 100644 --- a/sys/dev/lge/if_lge.c +++ b/sys/dev/lge/if_lge.c @@ -138,7 +138,7 @@ static void lge_init(void *); static void lge_init_locked(struct lge_softc *); static void lge_stop(struct lge_softc *); static void lge_watchdog(struct ifnet *); -static void lge_shutdown(device_t); +static int lge_shutdown(device_t); static int lge_ifmedia_upd(struct ifnet *); static void lge_ifmedia_upd_locked(struct ifnet *); static void lge_ifmedia_sts(struct ifnet *, struct ifmediareq *); @@ -1579,7 +1579,7 @@ lge_stop(sc) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void +static int lge_shutdown(dev) device_t dev; { @@ -1592,5 +1592,5 @@ lge_shutdown(dev) lge_stop(sc); LGE_UNLOCK(sc); - return; + return (0); } diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c index d703b81d3288..8467fd0914b7 100644 --- a/sys/dev/msk/if_msk.c +++ b/sys/dev/msk/if_msk.c @@ -222,7 +222,7 @@ static const char *model_name[] = { static int mskc_probe(device_t); static int mskc_attach(device_t); static int mskc_detach(device_t); -static void mskc_shutdown(device_t); +static int mskc_shutdown(device_t); static int mskc_setup_rambuffer(struct msk_softc *); static int mskc_suspend(device_t); static int mskc_resume(device_t); @@ -2916,7 +2916,7 @@ msk_watchdog(struct msk_if_softc *sc_if) taskqueue_enqueue(taskqueue_fast, &sc_if->msk_tx_task); } -static void +static int mskc_shutdown(device_t dev) { struct msk_softc *sc; @@ -2939,6 +2939,7 @@ mskc_shutdown(device_t dev) CSR_WRITE_2(sc, B0_CTST, CS_RST_SET); MSK_UNLOCK(sc); + return (0); } static int diff --git a/sys/dev/nfe/if_nfe.c b/sys/dev/nfe/if_nfe.c index d76ff570f1b7..dab166d450bf 100644 --- a/sys/dev/nfe/if_nfe.c +++ b/sys/dev/nfe/if_nfe.c @@ -76,7 +76,7 @@ static int nfe_attach(device_t); static int nfe_detach(device_t); static int nfe_suspend(device_t); static int nfe_resume(device_t); -static void nfe_shutdown(device_t); +static int nfe_shutdown(device_t); static void nfe_power(struct nfe_softc *); static int nfe_miibus_readreg(device_t, int, int); static int nfe_miibus_writereg(device_t, int, int, int); @@ -3115,7 +3115,7 @@ nfe_tick(void *xsc) } -static void +static int nfe_shutdown(device_t dev) { struct nfe_softc *sc; @@ -3128,6 +3128,8 @@ nfe_shutdown(device_t dev) nfe_stop(ifp); /* nfe_reset(sc); */ NFE_UNLOCK(sc); + + return (0); } diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c index f728f88c1d3e..55ee4ee3594c 100644 --- a/sys/dev/nge/if_nge.c +++ b/sys/dev/nge/if_nge.c @@ -166,7 +166,7 @@ static void nge_init(void *); static void nge_init_locked(struct nge_softc *); static void nge_stop(struct nge_softc *); static void nge_watchdog(struct ifnet *); -static void nge_shutdown(device_t); +static int nge_shutdown(device_t); static int nge_ifmedia_upd(struct ifnet *); static void nge_ifmedia_upd_locked(struct ifnet *); static void nge_ifmedia_sts(struct ifnet *, struct ifmediareq *); @@ -2161,7 +2161,7 @@ nge_stop(sc) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void +static int nge_shutdown(dev) device_t dev; { @@ -2174,5 +2174,5 @@ nge_shutdown(dev) nge_stop(sc); NGE_UNLOCK(sc); - return; + return (0); } diff --git a/sys/dev/nve/if_nve.c b/sys/dev/nve/if_nve.c index 7ae7993458e9..322ad076999c 100644 --- a/sys/dev/nve/if_nve.c +++ b/sys/dev/nve/if_nve.c @@ -130,7 +130,7 @@ static int nve_detach(device_t); static void nve_init(void *); static void nve_init_locked(struct nve_softc *); static void nve_stop(struct nve_softc *); -static void nve_shutdown(device_t); +static int nve_shutdown(device_t); static int nve_init_rings(struct nve_softc *); static void nve_free_rings(struct nve_softc *); @@ -717,7 +717,7 @@ nve_stop(struct nve_softc *sc) } /* Shutdown interface for unload/reboot */ -static void +static int nve_shutdown(device_t dev) { struct nve_softc *sc; @@ -730,6 +730,8 @@ nve_shutdown(device_t dev) NVE_LOCK(sc); nve_stop(sc); NVE_UNLOCK(sc); + + return (0); } /* Allocate TX ring buffers */ diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 8242c5418e77..d6ce99891228 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -261,7 +261,7 @@ static void re_stop (struct rl_softc *); static void re_watchdog (struct rl_softc *); static int re_suspend (device_t); static int re_resume (device_t); -static void re_shutdown (device_t); +static int re_shutdown (device_t); static int re_ifmedia_upd (struct ifnet *); static void re_ifmedia_sts (struct ifnet *, struct ifmediareq *); @@ -2806,7 +2806,7 @@ re_resume(dev) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void +static int re_shutdown(dev) device_t dev; { @@ -2823,4 +2823,6 @@ re_shutdown(dev) */ sc->rl_ifp->if_flags &= ~IFF_UP; RL_UNLOCK(sc); + + return (0); } diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c index c76f4d321e71..b3f6086ecedf 100644 --- a/sys/dev/sf/if_sf.c +++ b/sys/dev/sf/if_sf.c @@ -147,7 +147,7 @@ static void sf_init(void *); static void sf_init_locked(struct sf_softc *); static void sf_stop(struct sf_softc *); static void sf_watchdog(struct ifnet *); -static void sf_shutdown(device_t); +static int sf_shutdown(device_t); static int sf_ifmedia_upd(struct ifnet *); static void sf_ifmedia_upd_locked(struct ifnet *); static void sf_ifmedia_sts(struct ifnet *, struct ifmediareq *); @@ -1588,7 +1588,7 @@ sf_watchdog(ifp) SF_UNLOCK(sc); } -static void +static int sf_shutdown(dev) device_t dev; { @@ -1599,4 +1599,6 @@ sf_shutdown(dev) SF_LOCK(sc); sf_stop(sc); SF_UNLOCK(sc); + + return (0); } diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index fe2490209e1d..217d3a6ff9b1 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -190,7 +190,7 @@ static struct sk_type sk_devs[] = { static int skc_probe(device_t); static int skc_attach(device_t); static int skc_detach(device_t); -static void skc_shutdown(device_t); +static int skc_shutdown(device_t); static int skc_suspend(device_t); static int skc_resume(device_t); static int sk_detach(device_t); @@ -2691,7 +2691,7 @@ done: return; } -static void +static int skc_shutdown(dev) device_t dev; { @@ -2710,7 +2710,7 @@ skc_shutdown(dev) sk_reset(sc); SK_UNLOCK(sc); - return; + return (0); } static int diff --git a/sys/dev/stge/if_stge.c b/sys/dev/stge/if_stge.c index 54eee1a6cb5b..5ddb14e6ca58 100644 --- a/sys/dev/stge/if_stge.c +++ b/sys/dev/stge/if_stge.c @@ -130,7 +130,7 @@ static struct stge_product { static int stge_probe(device_t); static int stge_attach(device_t); static int stge_detach(device_t); -static void stge_shutdown(device_t); +static int stge_shutdown(device_t); static int stge_suspend(device_t); static int stge_resume(device_t); @@ -1118,7 +1118,7 @@ stge_dma_free(struct stge_softc *sc) * * Make sure the interface is stopped at reboot time. */ -static void +static int stge_shutdown(device_t dev) { struct stge_softc *sc; @@ -1128,6 +1128,8 @@ stge_shutdown(device_t dev) STGE_LOCK(sc); stge_stop(sc); STGE_UNLOCK(sc); + + return (0); } static int diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index 91d571b56704..343dee589827 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -195,7 +195,7 @@ static void ti_init_locked(void *); static void ti_init2(struct ti_softc *); static void ti_stop(struct ti_softc *); static void ti_watchdog(struct ifnet *); -static void ti_shutdown(device_t); +static int ti_shutdown(device_t); static int ti_ifmedia_upd(struct ifnet *); static void ti_ifmedia_sts(struct ifnet *, struct ifmediareq *); @@ -3874,7 +3874,7 @@ ti_stop(sc) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void +static int ti_shutdown(dev) device_t dev; { @@ -3884,4 +3884,6 @@ ti_shutdown(dev) TI_LOCK(sc); ti_chipinit(sc); TI_UNLOCK(sc); + + return (0); } diff --git a/sys/dev/vge/if_vge.c b/sys/dev/vge/if_vge.c index 466e4fc3e1b4..9acbdacd4397 100644 --- a/sys/dev/vge/if_vge.c +++ b/sys/dev/vge/if_vge.c @@ -168,7 +168,7 @@ static void vge_stop (struct vge_softc *); static void vge_watchdog (struct ifnet *); static int vge_suspend (device_t); static int vge_resume (device_t); -static void vge_shutdown (device_t); +static int vge_shutdown (device_t); static int vge_ifmedia_upd (struct ifnet *); static void vge_ifmedia_sts (struct ifnet *, struct ifmediareq *); @@ -2374,7 +2374,7 @@ vge_resume(dev) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void +static int vge_shutdown(dev) device_t dev; { @@ -2383,4 +2383,6 @@ vge_shutdown(dev) sc = device_get_softc(dev); vge_stop(sc); + + return (0); } diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index dd514ee97687..0550e9be00e5 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.c @@ -186,7 +186,7 @@ static void vr_init(void *); static void vr_init_locked(struct vr_softc *); static void vr_stop(struct vr_softc *); static void vr_watchdog(struct ifnet *); -static void vr_shutdown(device_t); +static int vr_shutdown(device_t); static int vr_ifmedia_upd(struct ifnet *); static void vr_ifmedia_sts(struct ifnet *, struct ifmediareq *); @@ -1595,9 +1595,11 @@ vr_stop(struct vr_softc *sc) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void +static int vr_shutdown(device_t dev) { vr_detach(dev); + + return (0); } diff --git a/sys/dev/vx/if_vx_pci.c b/sys/dev/vx/if_vx_pci.c index 194887f5040b..041277801162 100644 --- a/sys/dev/vx/if_vx_pci.c +++ b/sys/dev/vx/if_vx_pci.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include <dev/vx/if_vxreg.h> #include <dev/vx/if_vxvar.h> -static void vx_pci_shutdown(device_t); +static int vx_pci_shutdown(device_t); static int vx_pci_probe(device_t); static int vx_pci_attach(device_t); @@ -76,7 +76,7 @@ DRIVER_MODULE(vx, pci, vx_driver, vx_devclass, 0, 0); MODULE_DEPEND(vx, pci, 1, 1, 1); MODULE_DEPEND(vx, ether, 1, 1, 1); -static void +static int vx_pci_shutdown(device_t dev) { struct vx_softc *sc; @@ -85,6 +85,8 @@ vx_pci_shutdown(device_t dev) VX_LOCK(sc); vx_stop(sc); VX_UNLOCK(sc); + + return (0); } static int |