Fix function prototype for device_shutdown method.

This commit is contained in:
Pyun YongHyeon 2007-11-22 02:45:00 +00:00
parent e7356456ed
commit 6a087a8722
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173839
21 changed files with 80 additions and 48 deletions

View File

@ -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);
}

View File

@ -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

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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 */

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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 @@ sk_watchdog(arg)
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

View File

@ -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

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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

View File

@ -208,7 +208,7 @@ static void rl_reset(struct rl_softc *);
static int rl_resume(device_t);
static void rl_rxeof(struct rl_softc *);
static void rl_setmulti(struct rl_softc *);
static void rl_shutdown(device_t);
static int rl_shutdown(device_t);
static void rl_start(struct ifnet *);
static void rl_start_locked(struct ifnet *);
static void rl_stop(struct rl_softc *);
@ -1799,7 +1799,7 @@ rl_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
rl_shutdown(device_t dev)
{
struct rl_softc *sc;
@ -1809,4 +1809,6 @@ rl_shutdown(device_t dev)
RL_LOCK(sc);
rl_stop(sc);
RL_UNLOCK(sc);
return (0);
}

View File

@ -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);
}

View File

@ -109,7 +109,7 @@ static int ste_encap(struct ste_softc *, struct ste_chain *, struct mbuf *);
static void ste_start(struct ifnet *);
static void ste_start_locked(struct ifnet *);
static void ste_watchdog(struct ifnet *);
static void ste_shutdown(device_t);
static int ste_shutdown(device_t);
static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *,
struct mbuf *);
static int ste_ifmedia_upd(struct ifnet *);
@ -1736,7 +1736,7 @@ ste_watchdog(ifp)
return;
}
static void
static int
ste_shutdown(dev)
device_t dev;
{
@ -1748,5 +1748,5 @@ ste_shutdown(dev)
ste_stop(sc);
STE_UNLOCK(sc);
return;
return (0);
}

View File

@ -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);
}

View File

@ -246,7 +246,7 @@ static void xl_init(void *);
static void xl_init_locked(struct xl_softc *);
static void xl_stop(struct xl_softc *);
static int xl_watchdog(struct xl_softc *);
static void xl_shutdown(device_t);
static int xl_shutdown(device_t);
static int xl_suspend(device_t);
static int xl_resume(device_t);
@ -3344,7 +3344,7 @@ xl_stop(struct xl_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
xl_shutdown(device_t dev)
{
struct xl_softc *sc;
@ -3355,6 +3355,8 @@ xl_shutdown(device_t dev)
xl_reset(sc);
xl_stop(sc);
XL_UNLOCK(sc);
return (0);
}
static int