Index: sys/dev/ld.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ld.c,v
retrieving revision 1.40
diff -u -r1.40 ld.c
--- sys/dev/ld.c        28 Mar 2006 17:38:29 -0000      1.40
+++ sys/dev/ld.c        22 Apr 2006 17:08:28 -0000
@@ -72,7 +72,7 @@
static void    ldgetdefaultlabel(struct ld_softc *, struct disklabel *);
static void    ldgetdisklabel(struct ld_softc *);
static void    ldminphys(struct buf *bp);
-static void    ldshutdown(void *);
+static void    ldshutdown(int, void *);
static void    ldstart(struct ld_softc *);

extern struct  cfdriver ld_cd;
@@ -256,7 +256,7 @@

/* ARGSUSED */
static void
-ldshutdown(void *cookie)
+ldshutdown(int howto, void *cookie)
{
       struct ld_softc *sc;
       int i;
Index: sys/dev/acpi/acpi.c
===================================================================
RCS file: /cvsroot/src/sys/dev/acpi/acpi.c,v
retrieving revision 1.85
diff -u -r1.85 acpi.c
--- sys/dev/acpi/acpi.c 26 Feb 2006 18:46:04 -0000      1.85
+++ sys/dev/acpi/acpi.c 22 Apr 2006 17:08:32 -0000
@@ -159,7 +159,7 @@
/*
 * Prototypes.
 */
-static void            acpi_shutdown(void *);
+static void            acpi_shutdown(int, void *);
static void            acpi_build_tree(struct acpi_softc *);
static ACPI_STATUS     acpi_make_devnode(ACPI_HANDLE, UINT32, void *, void **);

@@ -397,7 +397,7 @@
 *     might confuse us.
 */
static void
-acpi_shutdown(void *arg)
+acpi_shutdown(int howto, void *arg)
{
       /* nothing */
}
Index: sys/dev/ata/wd.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ata/wd.c,v
retrieving revision 1.323
diff -u -r1.323 wd.c
--- sys/dev/ata/wd.c    5 Apr 2006 02:40:57 -0000       1.323
+++ sys/dev/ata/wd.c    22 Apr 2006 17:08:35 -0000
@@ -191,7 +191,7 @@
int   wd_get_params(struct wd_softc *, u_int8_t, struct ataparams *);
int   wd_standby(struct wd_softc *, int);
int   wd_flushcache(struct wd_softc *, int);
-void  wd_shutdown(void *);
+void  wd_shutdown(int, void *);

int   wd_getcache(struct wd_softc *, int *);
int   wd_setcache(struct wd_softc *, int);
@@ -1829,7 +1829,7 @@
}

void
-wd_shutdown(void *arg)
+wd_shutdown(int howto, void *arg)
{
       struct wd_softc *wd = arg;
       wd_flushcache(wd, AT_POLL);
Index: sys/dev/bi/if_ni.c
===================================================================
RCS file: /cvsroot/src/sys/dev/bi/if_ni.c,v
retrieving revision 1.27
diff -u -r1.27 if_ni.c
--- sys/dev/bi/if_ni.c  11 Dec 2005 12:21:15 -0000      1.27
+++ sys/dev/bi/if_ni.c  22 Apr 2006 17:08:35 -0000
@@ -149,7 +149,7 @@
static int     ni_add_rxbuf(struct ni_softc *, struct ni_dg *, int);
static void    ni_setup(struct ni_softc *);
static void    nitimeout(struct ifnet *);
-static void    ni_shutdown(void *);
+static void    ni_shutdown(int, void *);
static void ni_getpgs(struct ni_softc *sc, int size, caddr_t *v, paddr_t *p);
static int failtest(struct ni_softc *, int, int, int, const char *);

@@ -891,7 +891,8 @@
 * Shutdown hook.  Make sure the interface is stopped at reboot.
 */
void
-ni_shutdown(arg)
+ni_shutdown(howto, arg)
+       int howto;
       void *arg;
{
       struct ni_softc *sc = arg;
Index: sys/dev/i2o/iop.c
===================================================================
RCS file: /cvsroot/src/sys/dev/i2o/iop.c,v
retrieving revision 1.55
diff -u -r1.55 iop.c
--- sys/dev/i2o/iop.c   14 Apr 2006 20:16:02 -0000      1.55
+++ sys/dev/i2o/iop.c   22 Apr 2006 17:08:41 -0000
@@ -227,7 +227,7 @@
static void    iop_configure_devices(struct iop_softc *, int, int);
static void    iop_devinfo(int, char *, size_t);
static int     iop_print(void *, const char *);
-static void    iop_shutdown(void *);
+static void    iop_shutdown(int, void *);

static void    iop_adjqparam(struct iop_softc *, int);
static void    iop_create_reconf_thread(void *);
@@ -903,7 +903,7 @@
 * Shut down all configured IOPs.
 */
static void
-iop_shutdown(void *junk)
+iop_shutdown(int howto, void *junk)
{
       struct iop_softc *sc;
       int i;
Index: sys/dev/ic/aac.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/aac.c,v
retrieving revision 1.27
diff -u -r1.27 aac.c
--- sys/dev/ic/aac.c    4 Mar 2006 20:44:11 -0000       1.27
+++ sys/dev/ic/aac.c    22 Apr 2006 17:08:43 -0000
@@ -105,7 +105,7 @@
static void    aac_host_response(struct aac_softc *);
static int     aac_init(struct aac_softc *);
static int     aac_print(void *, const char *);
-static void    aac_shutdown(void *);
+static void    aac_shutdown(int, void *);
static void    aac_startup(struct aac_softc *);
static int     aac_sync_command(struct aac_softc *, u_int32_t, u_int32_t,
                                u_int32_t, u_int32_t, u_int32_t, u_int32_t *);
@@ -693,7 +693,7 @@
}

static void
-aac_shutdown(void *cookie)
+aac_shutdown(int howto, void *cookie)
{
       struct aac_softc *sc;
       struct aac_close_command cc;
Index: sys/dev/ic/aic6915.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/aic6915.c,v
retrieving revision 1.15
diff -u -r1.15 aic6915.c
--- sys/dev/ic/aic6915.c        24 Dec 2005 20:27:29 -0000      1.15
+++ sys/dev/ic/aic6915.c        22 Apr 2006 17:08:44 -0000
@@ -82,7 +82,7 @@
static int     sf_init(struct ifnet *);
static void    sf_stop(struct ifnet *, int);

-static void    sf_shutdown(void *);
+static void    sf_shutdown(int, void *);

static void    sf_txintr(struct sf_softc *);
static void    sf_rxintr(struct sf_softc *);
@@ -340,7 +340,7 @@
 *     Shutdown hook -- make sure the interface is stopped at reboot.
 */
static void
-sf_shutdown(void *arg)
+sf_shutdown(int howto, void *arg)
{
       struct sf_softc *sc = arg;

Index: sys/dev/ic/aic79xx.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/aic79xx.c,v
retrieving revision 1.34
diff -u -r1.34 aic79xx.c
--- sys/dev/ic/aic79xx.c        8 Mar 2006 23:46:24 -0000       1.34
+++ sys/dev/ic/aic79xx.c        22 Apr 2006 17:09:00 -0000
@@ -5219,7 +5219,7 @@
}

void
-ahd_shutdown(void *arg)
+ahd_shutdown(int howto, void *arg)
{
       struct  ahd_softc *ahd;

Index: sys/dev/ic/aic7xxx.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/aic7xxx.c,v
retrieving revision 1.120
diff -u -r1.120 aic7xxx.c
--- sys/dev/ic/aic7xxx.c        15 Apr 2006 14:22:52 -0000      1.120
+++ sys/dev/ic/aic7xxx.c        22 Apr 2006 17:09:09 -0000
@@ -3969,7 +3969,7 @@
}

void
-ahc_shutdown(void *arg)
+ahc_shutdown(int howto, void *arg)
{
       struct  ahc_softc *ahc;
       int     i;
Index: sys/dev/ic/ath.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/ath.c,v
retrieving revision 1.71
diff -u -r1.71 ath.c
--- sys/dev/ic/ath.c    14 Apr 2006 20:20:33 -0000      1.71
+++ sys/dev/ic/ath.c    22 Apr 2006 17:09:17 -0000
@@ -778,7 +778,7 @@
}

void
-ath_shutdown(void *arg)
+ath_shutdown(int howto, void *arg)
{
       struct ath_softc *sc = arg;

Index: sys/dev/ic/atw.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/atw.c,v
retrieving revision 1.117
diff -u -r1.117 atw.c
--- sys/dev/ic/atw.c    6 Apr 2006 06:08:26 -0000       1.117
+++ sys/dev/ic/atw.c    22 Apr 2006 17:09:21 -0000
@@ -213,7 +213,7 @@
int    atw_enable(struct atw_softc *);
void   atw_power(int, void *);
void   atw_reset(struct atw_softc *);
-void   atw_shutdown(void *);
+void   atw_shutdown(int, void *);

/* Interrupt handlers */
void   atw_linkintr(struct atw_softc *, u_int32_t);
@@ -2775,7 +2775,7 @@

/* atw_shutdown: make sure the interface is stopped at reboot time. */
void
-atw_shutdown(void *arg)
+atw_shutdown(int howto, void *arg)
{
       struct atw_softc *sc = arg;

Index: sys/dev/ic/awi.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/awi.c,v
retrieving revision 1.70
diff -u -r1.70 awi.c
--- sys/dev/ic/awi.c    14 Apr 2006 20:33:57 -0000      1.70
+++ sys/dev/ic/awi.c    22 Apr 2006 17:09:23 -0000
@@ -450,7 +450,7 @@
#endif /* __NetBSD__ */

void
-awi_shutdown(void *arg)
+awi_shutdown(int howto, void *arg)
{
       struct awi_softc *sc = arg;
       struct ifnet *ifp = &sc->sc_if;
Index: sys/dev/ic/cac.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/cac.c,v
retrieving revision 1.34
diff -u -r1.34 cac.c
--- sys/dev/ic/cac.c    29 Jan 2006 21:42:42 -0000      1.34
+++ sys/dev/ic/cac.c    22 Apr 2006 17:09:23 -0000
@@ -70,7 +70,7 @@
static int     cac_ccb_poll(struct cac_softc *, struct cac_ccb *, int);
static int     cac_ccb_start(struct cac_softc *, struct cac_ccb *);
static int     cac_print(void *, const char *);
-static void    cac_shutdown(void *);
+static void    cac_shutdown(int, void *);

static struct  cac_ccb *cac_l0_completed(struct cac_softc *);
static int     cac_l0_fifo_full(struct cac_softc *);
@@ -200,7 +200,7 @@
 * Shut down all `cac' controllers.
 */
static void
-cac_shutdown(void *cookie)
+cac_shutdown(int howto, void *cookie)
{
       extern struct cfdriver cac_cd;
       struct cac_softc *sc;
Index: sys/dev/ic/ciss.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/ciss.c,v
retrieving revision 1.2
diff -u -r1.2 ciss.c
--- sys/dev/ic/ciss.c   15 Apr 2006 12:36:23 -0000      1.2
+++ sys/dev/ic/ciss.c   22 Apr 2006 17:09:24 -0000
@@ -80,7 +80,7 @@
#endif
static int     ciss_sync(struct ciss_softc *sc);
static void    ciss_heartbeat(void *v);
-static void    ciss_shutdown(void *v);
+static void    ciss_shutdown(int howto, void *v);
#if 0
static void    ciss_kthread(void *v);
#endif
@@ -382,7 +382,7 @@
}

static void
-ciss_shutdown(void *v)
+ciss_shutdown(int howto, void *v)
{
       struct ciss_softc *sc = v;

Index: sys/dev/ic/cs89x0.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/cs89x0.c,v
retrieving revision 1.19
diff -u -r1.19 cs89x0.c
--- sys/dev/ic/cs89x0.c 18 Mar 2006 18:44:16 -0000      1.19
+++ sys/dev/ic/cs89x0.c 22 Apr 2006 17:09:29 -0000
@@ -269,6 +269,7 @@
int    cs_get_params(struct cs_softc *);
int    cs_get_enaddr(struct cs_softc *);
int    cs_reset_chip(struct cs_softc *);
+void   cs_shutdown(int, void *);
void   cs_reset(void *);
int    cs_ioctl(struct ifnet *, u_long, caddr_t);
void   cs_initChip(struct cs_softc *);
@@ -492,7 +493,7 @@
       if (sc->sc_dma_attach)
               (*sc->sc_dma_attach)(sc);

-       sc->sc_sh = shutdownhook_establish(cs_reset, sc);
+       sc->sc_sh = shutdownhook_establish(cs_shutdown, sc);
       if (sc->sc_sh == NULL) {
               printf("%s: unable to establish shutdownhook\n",
                   sc->sc_dev.dv_xname);
@@ -1311,6 +1312,12 @@
}

void
+cs_shutdown(int howto, void *arg)
+{
+       cs_reset(arg);
+}
+
+void
cs_reset(void *arg)
{
       struct cs_softc *sc = arg;
Index: sys/dev/ic/dp83932.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/dp83932.c,v
retrieving revision 1.13
diff -u -r1.13 dp83932.c
--- sys/dev/ic/dp83932.c        11 Dec 2005 12:21:26 -0000      1.13
+++ sys/dev/ic/dp83932.c        22 Apr 2006 17:09:31 -0000
@@ -78,7 +78,7 @@
int    sonic_init(struct ifnet *);
void   sonic_stop(struct ifnet *, int);

-void   sonic_shutdown(void *);
+void   sonic_shutdown(int, void *);

void   sonic_reset(struct sonic_softc *);
void   sonic_rxdrain(struct sonic_softc *);
@@ -262,7 +262,7 @@
 *     Make sure the interface is stopped at reboot.
 */
void
-sonic_shutdown(void *arg)
+sonic_shutdown(int howto, void *arg)
{
       struct sonic_softc *sc = arg;

Index: sys/dev/ic/dpt.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/dpt.c,v
retrieving revision 1.47
diff -u -r1.47 dpt.c
--- sys/dev/ic/dpt.c    14 Apr 2006 20:43:11 -0000      1.47
+++ sys/dev/ic/dpt.c    22 Apr 2006 17:09:32 -0000
@@ -200,7 +200,7 @@
                               struct lwp *);
static void    dpt_scsipi_request(struct scsipi_channel *,
                                  scsipi_adapter_req_t, void *);
-static void    dpt_shutdown(void *);
+static void    dpt_shutdown(int, void *);
static void    dpt_sysinfo(struct dpt_softc *, struct dpt_sysinfo *);
static int     dpt_wait(struct dpt_softc *, u_int8_t, u_int8_t, int);

@@ -613,7 +613,7 @@
 * we tell root that it's safe to power off).
 */
static void
-dpt_shutdown(void *cookie)
+dpt_shutdown(int howto, void *cookie)
{
       extern struct cfdriver dpt_cd;
       struct dpt_softc *sc;
Index: sys/dev/ic/elink3.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/elink3.c,v
retrieving revision 1.115
diff -u -r1.115 elink3.c
--- sys/dev/ic/elink3.c 20 Feb 2006 16:50:37 -0000      1.115
+++ sys/dev/ic/elink3.c 22 Apr 2006 17:09:33 -0000
@@ -200,7 +200,7 @@
void   epstart(struct ifnet *);
void   epwatchdog(struct ifnet *);
void   epreset(struct ep_softc *);
-static void epshutdown(void *);
+static void epshutdown(int, void *);
void   epread(struct ep_softc *);
struct mbuf *epget(struct ep_softc *, int);
void   epmbuffill(void *);
@@ -1844,7 +1844,8 @@
 * Before reboots, reset card completely.
 */
static void
-epshutdown(arg)
+epshutdown(why, arg)
+       int why;
       void *arg;
{
       struct ep_softc *sc = arg;
Index: sys/dev/ic/elinkxl.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/elinkxl.c,v
retrieving revision 1.87
diff -u -r1.87 elinkxl.c
--- sys/dev/ic/elinkxl.c        20 Feb 2006 16:50:37 -0000      1.87
+++ sys/dev/ic/elinkxl.c        22 Apr 2006 17:09:38 -0000
@@ -111,7 +111,7 @@
static int ex_add_rxbuf(struct ex_softc *, struct ex_rxdesc *);
static void ex_init_txdescs(struct ex_softc *);

-static void ex_shutdown(void *);
+static void ex_shutdown(int, void *);
static void ex_start(struct ifnet *);
static void ex_txstat(struct ex_softc *);

@@ -1704,7 +1704,8 @@
 * Before reboots, reset card completely.
 */
static void
-ex_shutdown(arg)
+ex_shutdown(howto, arg)
+       int howto;
       void *arg;
{
       struct ex_softc *sc = arg;
Index: sys/dev/ic/gem.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/gem.c,v
retrieving revision 1.45
diff -u -r1.45 gem.c
--- sys/dev/ic/gem.c    2 Jan 2006 05:46:25 -0000       1.45
+++ sys/dev/ic/gem.c    22 Apr 2006 17:09:41 -0000
@@ -90,7 +90,7 @@
int            gem_ioctl(struct ifnet *, u_long, caddr_t);
void           gem_tick(void *);
void           gem_watchdog(struct ifnet *);
-void           gem_shutdown(void *);
+void           gem_shutdown(int, void *);
int            gem_init(struct ifnet *);
void           gem_init_regs(struct gem_softc *sc);
static int     gem_ringsize(int sz);
@@ -2073,7 +2073,8 @@


void
-gem_shutdown(arg)
+gem_shutdown(howto, arg)
+       int howto;
       void *arg;
{
       struct gem_softc *sc = (struct gem_softc *)arg;
Index: sys/dev/ic/hme.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/hme.c,v
retrieving revision 1.53
diff -u -r1.53 hme.c
--- sys/dev/ic/hme.c    24 Dec 2005 23:41:33 -0000      1.53
+++ sys/dev/ic/hme.c    22 Apr 2006 17:09:42 -0000
@@ -102,7 +102,7 @@
int            hme_ioctl(struct ifnet *, u_long, caddr_t);
void           hme_tick(void *);
void           hme_watchdog(struct ifnet *);
-void           hme_shutdown(void *);
+void           hme_shutdown(int, void *);
void           hme_init(struct hme_softc *);
void           hme_meminit(struct hme_softc *);
void           hme_mifinit(struct hme_softc *);
@@ -1554,7 +1554,8 @@
}

void
-hme_shutdown(arg)
+hme_shutdown(howto, arg)
+       int howto;
       void *arg;
{

Index: sys/dev/ic/i82557.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/i82557.c,v
retrieving revision 1.97
diff -u -r1.97 i82557.c
--- sys/dev/ic/i82557.c 20 Feb 2006 16:50:37 -0000      1.97
+++ sys/dev/ic/i82557.c 22 Apr 2006 17:09:48 -0000
@@ -207,7 +207,7 @@
void   fxp_mc_setup(struct fxp_softc *);
void   fxp_load_ucode(struct fxp_softc *);

-void   fxp_shutdown(void *);
+void   fxp_shutdown(int, void *);
void   fxp_power(int, void *);

int    fxp_copy_small = 0;
@@ -540,7 +540,7 @@
 * kernel memory doesn't get clobbered during warmboot.
 */
void
-fxp_shutdown(void *arg)
+fxp_shutdown(int howto, void *arg)
{
       struct fxp_softc *sc = arg;

Index: sys/dev/ic/lance.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/lance.c,v
retrieving revision 1.34
diff -u -r1.34 lance.c
--- sys/dev/ic/lance.c  24 Dec 2005 20:27:30 -0000      1.34
+++ sys/dev/ic/lance.c  22 Apr 2006 17:09:49 -0000
@@ -127,7 +127,7 @@

integrate struct mbuf *lance_get(struct lance_softc *, int, int);

-hide void lance_shutdown(void *);
+hide void lance_shutdown(int, void *);

int lance_mediachange(struct ifnet *);
void lance_mediastatus(struct ifnet *, struct ifmediareq *);
@@ -630,7 +630,8 @@
}

hide void
-lance_shutdown(arg)
+lance_shutdown(howto, arg)
+       int howto;
       void *arg;
{

Index: sys/dev/ic/mlx.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/mlx.c,v
retrieving revision 1.42
diff -u -r1.42 mlx.c
--- sys/dev/ic/mlx.c    14 Apr 2006 21:06:47 -0000      1.42
+++ sys/dev/ic/mlx.c    22 Apr 2006 17:09:50 -0000
@@ -132,7 +132,7 @@
static void    mlx_periodic_thread(void *);
static int     mlx_print(void *, const char *);
static int     mlx_rebuild(struct mlx_softc *, int, int);
-static void    mlx_shutdown(void *);
+static void    mlx_shutdown(int, void *);
static int     mlx_user_command(struct mlx_softc *, struct mlx_usercommand *);

static inline time_t   mlx_curtime(void);
@@ -676,7 +676,7 @@
 * Shut down all configured `mlx' devices.
 */
static void
-mlx_shutdown(void *cookie)
+mlx_shutdown(int howto, void *cookie)
{
       struct mlx_softc *mlx;
       int i;
Index: sys/dev/ic/mtd803.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/mtd803.c,v
retrieving revision 1.10
diff -u -r1.10 mtd803.c
--- sys/dev/ic/mtd803.c 20 Feb 2006 16:50:37 -0000      1.10
+++ sys/dev/ic/mtd803.c 22 Apr 2006 17:09:53 -0000
@@ -986,7 +986,8 @@


void
-mtd_shutdown (arg)
+mtd_shutdown (howto, arg)
+       int howto;
       void *arg;
{
       struct mtd_softc *sc = arg;
Index: sys/dev/ic/rtl8169.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/rtl8169.c,v
retrieving revision 1.22
diff -u -r1.22 rtl8169.c
--- sys/dev/ic/rtl8169.c        11 Dec 2005 12:21:28 -0000      1.22
+++ sys/dev/ic/rtl8169.c        22 Apr 2006 17:09:56 -0000
@@ -167,7 +167,7 @@
static void re_stop(struct ifnet *, int);
static void re_watchdog(struct ifnet *);

-static void re_shutdown(void *);
+static void re_shutdown(int, void *);
static int re_enable(struct rtk_softc *);
static void re_disable(struct rtk_softc *);
static void re_power(int, void *);
@@ -1374,7 +1374,7 @@
 * get confused by errant DMAs when rebooting.
 */
static void
-re_shutdown(void *vsc)
+re_shutdown(int howto, void *vsc)

{
       struct rtk_softc        *sc = (struct rtk_softc *)vsc;
Index: sys/dev/ic/rtl81x9.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/rtl81x9.c,v
retrieving revision 1.52
diff -u -r1.52 rtl81x9.c
--- sys/dev/ic/rtl81x9.c        8 Dec 2005 18:06:42 -0000       1.52
+++ sys/dev/ic/rtl81x9.c        22 Apr 2006 17:09:58 -0000
@@ -140,7 +140,7 @@
STATIC void rtk_stop           (struct ifnet *, int);

STATIC void rtk_watchdog(struct ifnet *);
-STATIC void rtk_shutdown(void *);
+STATIC void rtk_shutdown(int, void *);
STATIC int rtk_ifmedia_upd(struct ifnet *);
STATIC void rtk_ifmedia_sts(struct ifnet *, struct ifmediareq *);

@@ -1642,7 +1642,8 @@
 * get confused by errant DMAs when rebooting.
 */
STATIC void
-rtk_shutdown(vsc)
+rtk_shutdown(howto, vsc)
+       int                     howto;
       void                    *vsc;
{
       struct rtk_softc        *sc = (struct rtk_softc *)vsc;
Index: sys/dev/ic/rtw.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/rtw.c,v
retrieving revision 1.72
diff -u -r1.72 rtw.c
--- sys/dev/ic/rtw.c    28 Mar 2006 00:48:10 -0000      1.72
+++ sys/dev/ic/rtw.c    22 Apr 2006 17:10:03 -0000
@@ -3766,7 +3766,7 @@

/* rtw_shutdown: make sure the interface is stopped at reboot time. */
void
-rtw_shutdown(void *arg)
+rtw_shutdown(int howto, void *arg)
{
       struct rtw_softc *sc = arg;

Index: sys/dev/ic/smc83c170.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/smc83c170.c,v
retrieving revision 1.63
diff -u -r1.63 smc83c170.c
--- sys/dev/ic/smc83c170.c      16 Apr 2006 00:38:59 -0000      1.63
+++ sys/dev/ic/smc83c170.c      22 Apr 2006 17:10:05 -0000
@@ -347,7 +347,8 @@
 * Shutdown hook.  Make sure the interface is stopped at reboot.
 */
void
-epic_shutdown(arg)
+epic_shutdown(howto, arg)
+       int howto;
       void *arg;
{
       struct epic_softc *sc = arg;
Index: sys/dev/ic/tropic.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/tropic.c,v
retrieving revision 1.26
diff -u -r1.26 tropic.c
--- sys/dev/ic/tropic.c 11 Dec 2005 12:21:28 -0000      1.26
+++ sys/dev/ic/tropic.c 22 Apr 2006 17:10:07 -0000
@@ -85,7 +85,7 @@
#include <dev/ic/tropicreg.h>
#include <dev/ic/tropicvar.h>

-static void tr_shutdown(void *);
+static void tr_shutdown(int, void *);
static void tr_reopen(void *);

void   tr_rint(struct tr_softc *);
@@ -583,7 +583,8 @@
}

static void
-tr_shutdown(arg)
+tr_shutdown(howto, arg)
+       int howto;
       void *arg;
{
       struct tr_softc *sc = arg;
Index: sys/dev/ic/tulip.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/tulip.c,v
retrieving revision 1.143
diff -u -r1.143 tulip.c
--- sys/dev/ic/tulip.c  25 Mar 2006 23:10:50 -0000      1.143
+++ sys/dev/ic/tulip.c  22 Apr 2006 17:10:15 -0000
@@ -101,7 +101,7 @@
static int     tlp_init(struct ifnet *);
static void    tlp_stop(struct ifnet *, int);

-static void    tlp_shutdown(void *);
+static void    tlp_shutdown(int, void *);

static void    tlp_rxdrain(struct tulip_softc *);
static int     tlp_add_rxbuf(struct tulip_softc *, int);
@@ -690,7 +690,7 @@
 *     Make sure the interface is stopped at reboot time.
 */
static void
-tlp_shutdown(void *arg)
+tlp_shutdown(int howto, void *arg)
{
       struct tulip_softc *sc = arg;

Index: sys/dev/ieee1394/fw_port.h
===================================================================
RCS file: /cvsroot/src/sys/dev/ieee1394/fw_port.h,v
retrieving revision 1.11
diff -u -r1.11 fw_port.h
--- sys/dev/ieee1394/fw_port.h  14 Apr 2006 21:47:04 -0000      1.11
+++ sys/dev/ieee1394/fw_port.h  22 Apr 2006 17:10:16 -0000
@@ -764,7 +764,7 @@
               shutdownhook_disestablish(sc->sc_shutdownhook)
#define FWOHCI_STOP()  \
       void    \
-       fwohci_stop(void *arg)
+       fwohci_stop(int howto, void *arg)
#define FWOHCI_STOP_START      struct fwohci_softc *sc = arg
#define FWOHCI_STOP_RETURN(r)  return

Index: sys/dev/isa/com_isa.c
===================================================================
RCS file: /cvsroot/src/sys/dev/isa/com_isa.c,v
retrieving revision 1.24
diff -u -r1.24 com_isa.c
--- sys/dev/isa/com_isa.c       11 Dec 2005 12:22:02 -0000      1.24
+++ sys/dev/isa/com_isa.c       22 Apr 2006 17:10:16 -0000
@@ -100,7 +100,7 @@

int com_isa_probe(struct device *, struct cfdata *, void *);
void com_isa_attach(struct device *, struct device *, void *);
-void com_isa_cleanup(void *);
+void com_isa_cleanup(int, void *);

CFATTACH_DECL(com_isa, sizeof(struct com_isa_softc),
    com_isa_probe, com_isa_attach, NULL, NULL);
@@ -196,7 +196,8 @@
}

void
-com_isa_cleanup(arg)
+com_isa_cleanup(howto, arg)
+       int howto;
       void *arg;
{
       struct com_softc *sc = arg;
Index: sys/dev/isa/fd.c
===================================================================
RCS file: /cvsroot/src/sys/dev/isa/fd.c,v
retrieving revision 1.67
diff -u -r1.67 fd.c
--- sys/dev/isa/fd.c    14 Apr 2006 13:09:06 -0000      1.67
+++ sys/dev/isa/fd.c    22 Apr 2006 17:10:20 -0000
@@ -243,6 +243,7 @@
const struct fd_type *fd_nvtotype(char *, int, int);
#endif /* i386 */
void fd_set_motor(struct fdc_softc *fdc, int reset);
+void fd_motor_shutdown(int howto, void *arg);
void fd_motor_off(void *arg);
void fd_motor_on(void *arg);
int fdcresult(struct fdc_softc *fdc);
@@ -507,7 +508,7 @@
       mountroothook_establish(fd_mountroot_hook, &fd->sc_dev);

       /* Needed to power off if the motor is on when we halt. */
-       fd->sc_sdhook = shutdownhook_establish(fd_motor_off, fd);
+       fd->sc_sdhook = shutdownhook_establish(fd_motor_shutdown, fd);

#if NRND > 0
       rnd_attach_source(&fd->rnd_source, fd->sc_dev.dv_xname,
@@ -738,6 +739,15 @@
}

void
+fd_motor_shutdown(howto, arg)
+       int howto;
+       void *arg;
+{
+       fd_motor_off(arg);
+}
+
+
+void
fd_motor_off(arg)
       void *arg;
{
Index: sys/dev/isa/if_ntwoc_isa.c
===================================================================
RCS file: /cvsroot/src/sys/dev/isa/if_ntwoc_isa.c,v
retrieving revision 1.12
diff -u -r1.12 if_ntwoc_isa.c
--- sys/dev/isa/if_ntwoc_isa.c  29 Mar 2006 04:16:50 -0000      1.12
+++ sys/dev/isa/if_ntwoc_isa.c  22 Apr 2006 17:10:22 -0000
@@ -93,7 +93,7 @@
static void ntwoc_isa_get_clock(struct sca_port *, u_int8_t, u_int8_t,
    u_int8_t, u_int8_t);
static void ntwoc_isa_setup_memory(struct sca_softc *sc);
-static void ntwoc_isa_shutdown(void *sc);
+static void ntwoc_isa_shutdown(int howto, void *sc);

CFATTACH_DECL(ntwoc_isa, sizeof(struct ntwoc_isa_softc),
    ntwoc_isa_probe, ntwoc_isa_attach, NULL, NULL);
@@ -690,7 +690,7 @@
 * boot.  Also, lower DTR on each port and disable card interrupts.
 */
static void
-ntwoc_isa_shutdown(void *aux)
+ntwoc_isa_shutdown(int howto, void *aux)
{
       struct ntwoc_isa_softc *sc = aux;
       u_int16_t mcr;
Index: sys/dev/marvell/gtmpsc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/marvell/gtmpsc.c,v
retrieving revision 1.16
diff -u -r1.16 gtmpsc.c
--- sys/dev/marvell/gtmpsc.c    29 Mar 2006 06:55:32 -0000      1.16
+++ sys/dev/marvell/gtmpsc.c    22 Apr 2006 17:10:24 -0000
@@ -158,7 +158,7 @@

STATIC void gtmpsc_txflush(gtmpsc_softc_t *);
STATIC void gtmpsc_iflush(gtmpsc_softc_t *);
-STATIC void gtmpsc_shutdownhook(void *);
+STATIC void gtmpsc_shutdownhook(int, void *);

dev_type_open(gtmpscopen);
dev_type_close(gtmpscclose);
@@ -1833,7 +1833,7 @@
}

void
-gtmpsc_shutdownhook(void *arg)
+gtmpsc_shutdownhook(int howto, void *arg)
{
       gtmpsc_softc_t *sc = (gtmpsc_softc_t *)arg;

Index: sys/dev/mca/com_mca.c
===================================================================
RCS file: /cvsroot/src/sys/dev/mca/com_mca.c,v
retrieving revision 1.14
diff -u -r1.14 com_mca.c
--- sys/dev/mca/com_mca.c       29 Mar 2006 06:58:14 -0000      1.14
+++ sys/dev/mca/com_mca.c       22 Apr 2006 17:10:24 -0000
@@ -105,7 +105,7 @@

int com_mca_probe(struct device *, struct cfdata *, void *);
void com_mca_attach(struct device *, struct device *, void *);
-void com_mca_cleanup(void *);
+void com_mca_cleanup(int, void *);

static int ibm_modem_getcfg(struct mca_attach_args *, int *, int *);
static int neocom1_getcfg(struct mca_attach_args *, int *, int *);
@@ -208,7 +208,8 @@
}

void
-com_mca_cleanup(arg)
+com_mca_cleanup(howto, arg)
+       int howto;
       void *arg;
{
       struct com_softc *sc = arg;
Index: sys/dev/mvme/clock_pcctwo.c
===================================================================
RCS file: /cvsroot/src/sys/dev/mvme/clock_pcctwo.c,v
retrieving revision 1.10
diff -u -r1.10 clock_pcctwo.c
--- sys/dev/mvme/clock_pcctwo.c 29 Mar 2006 07:07:41 -0000      1.10
+++ sys/dev/mvme/clock_pcctwo.c 22 Apr 2006 17:10:25 -0000
@@ -76,7 +76,7 @@
static int clock_pcctwo_statintr(void *);
static void clock_pcctwo_initclocks(void *, int, int);
static long clock_pcctwo_microtime(void *);
-static void clock_pcctwo_shutdown(void *);
+static void clock_pcctwo_shutdown(int, void *);

static struct clock_pcctwo_softc *clock_pcctwo_sc;

@@ -245,7 +245,8 @@

/* ARGSUSED */
void
-clock_pcctwo_shutdown(arg)
+clock_pcctwo_shutdown(howto, arg)
+       int howto;
       void *arg;
{

Index: sys/dev/pci/amr.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/amr.c,v
retrieving revision 1.34
diff -u -r1.34 amr.c
--- sys/dev/pci/amr.c   17 Apr 2006 13:31:02 -0000      1.34
+++ sys/dev/pci/amr.c   22 Apr 2006 17:10:26 -0000
@@ -104,7 +104,7 @@
static int     amr_intr(void *);
static int     amr_match(struct device *, struct cfdata *, void *);
static int     amr_print(void *, const char *);
-static void    amr_shutdown(void *);
+static void    amr_shutdown(int, void *);
static void    amr_teardown(struct amr_softc *);
static void    amr_thread(void *);
static void    amr_thread_create(void *);
@@ -717,7 +717,7 @@
 * shutdown time.
 */
static void
-amr_shutdown(void *cookie)
+amr_shutdown(int howto, void *cookie)
{
        extern struct cfdriver amr_cd;
       struct amr_softc *amr;
Index: sys/dev/pci/if_ath_pci.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_ath_pci.c,v
retrieving revision 1.12
diff -u -r1.12 if_ath_pci.c
--- sys/dev/pci/if_ath_pci.c    2 Apr 2006 05:52:50 -0000       1.12
+++ sys/dev/pci/if_ath_pci.c    22 Apr 2006 17:10:27 -0000
@@ -100,7 +100,7 @@

static int ath_pci_match(struct device *, struct cfdata *, void *);
static void ath_pci_attach(struct device *, struct device *, void *);
-static void ath_pci_shutdown(void *);
+static void ath_pci_shutdown(int, void *);
static int ath_pci_detach(struct device *, int);

CFATTACH_DECL(ath_pci,
@@ -236,7 +236,7 @@
}

static void
-ath_pci_shutdown(void *self)
+ath_pci_shutdown(int howto, void *self)
{
       struct ath_pci_softc *psc = (struct ath_pci_softc *)self;

Index: sys/dev/pci/if_de.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_de.c,v
retrieving revision 1.119
diff -u -r1.119 if_de.c
--- sys/dev/pci/if_de.c 20 Apr 2006 17:08:20 -0000      1.119
+++ sys/dev/pci/if_de.c 22 Apr 2006 17:10:39 -0000
@@ -5575,7 +5575,7 @@

#if defined(__NetBSD__)
#define        TULIP_PCI_ATTACH_ARGS   struct device * const parent, struct device * const self, void * const aux
-#define        TULIP_SHUTDOWN_ARGS     void *arg
+#define        TULIP_SHUTDOWN_ARGS     int howto, void *arg
static int
tulip_pci_probe(
    struct device *parent,
Index: sys/dev/pci/if_dge.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_dge.c,v
retrieving revision 1.12
diff -u -r1.12 if_dge.c
--- sys/dev/pci/if_dge.c        11 Dec 2005 12:22:49 -0000      1.12
+++ sys/dev/pci/if_dge.c        22 Apr 2006 17:10:41 -0000
@@ -618,7 +618,7 @@
static int     dge_init(struct ifnet *);
static void    dge_stop(struct ifnet *, int);

-static void    dge_shutdown(void *);
+static void    dge_shutdown(int, void *);

static void    dge_reset(struct dge_softc *);
static void    dge_rxdrain(struct dge_softc *);
@@ -1007,7 +1007,7 @@
 *     Make sure the interface is stopped at reboot time.
 */
static void
-dge_shutdown(void *arg)
+dge_shutdown(int howto, void *arg)
{
       struct dge_softc *sc = arg;

Index: sys/dev/pci/if_ipw.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_ipw.c,v
retrieving revision 1.20
diff -u -r1.20 if_ipw.c
--- sys/dev/pci/if_ipw.c        18 Apr 2006 12:49:02 -0000      1.20
+++ sys/dev/pci/if_ipw.c        22 Apr 2006 17:10:45 -0000
@@ -94,7 +94,7 @@
static void    ipw_attach(struct device *, struct device *, void *);
static int     ipw_detach(struct device *, int);

-static void    ipw_shutdown(void *);
+static void    ipw_shutdown(int, void *);
static int     ipw_suspend(struct ipw_softc *);
static int     ipw_resume(struct ipw_softc *);
static void    ipw_powerhook(int, void *);
@@ -748,7 +748,7 @@
}

static void
-ipw_shutdown(void *arg)
+ipw_shutdown(int howto, void *arg)
{
       struct ipw_softc *sc = (struct ipw_softc *)arg;
       struct ifnet *ifp = sc->sc_ic.ic_ifp;
Index: sys/dev/pci/if_iwi.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_iwi.c,v
retrieving revision 1.47
diff -u -r1.47 if_iwi.c
--- sys/dev/pci/if_iwi.c        11 Apr 2006 15:42:56 -0000      1.47
+++ sys/dev/pci/if_iwi.c        22 Apr 2006 17:10:50 -0000
@@ -91,7 +91,7 @@
static void    iwi_attach(struct device *, struct device *, void *);
static int     iwi_detach(struct device *, int);

-static void    iwi_shutdown(void *);
+static void    iwi_shutdown(int, void *);
static int     iwi_suspend(struct iwi_softc *);
static int     iwi_resume(struct iwi_softc *);
static void    iwi_powerhook(int, void *);
@@ -804,7 +804,7 @@
}

static void
-iwi_shutdown(void *arg)
+iwi_shutdown(int howto, void *arg)
{
       struct iwi_softc *sc = (struct iwi_softc *)arg;
       struct ifnet *ifp = sc->sc_ic.ic_ifp;
Index: sys/dev/pci/if_lmc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_lmc.c,v
retrieving revision 1.28
diff -u -r1.28 if_lmc.c
--- sys/dev/pci/if_lmc.c        20 Apr 2006 16:51:57 -0000      1.28
+++ sys/dev/pci/if_lmc.c        22 Apr 2006 17:11:00 -0000
@@ -7156,7 +7156,7 @@
  aprint_naive(": %s\n", sc->dev_desc);

  /* Install a shutdown hook. */
-  if ((sc->sdh_cookie = shutdownhook_establish(tulip_detach, sc)) == NULL)
+  if ((sc->sdh_cookie = shutdownhook_establish(nbsd_tulip_detach, sc)) == NULL)
    {
    aprint_error("%s: shutdown_hook_establish() failed\n", NAME_UNIT);
    nbsd_detach(self, 0);
@@ -7191,6 +7191,11 @@
  return 0;
  }

+nbsd_tulip_shutdown(int howto, void *arg)
+{
+       tulip_detach(arg);
+}
+
CFATTACH_DECL(lmc, sizeof(softc_t),            /* lmc_ca */
 nbsd_match, nbsd_attach, nbsd_detach, NULL);

@@ -7319,7 +7324,7 @@
  printf(" %s: %s\n", intrstr, sc->dev_desc);

  /* Install a shutdown hook. */
-  if ((sc->sdh_cookie = shutdownhook_establish(tulip_detach, sc)) == NULL)
+  if ((sc->sdh_cookie = shutdownhook_establish(tulip_shutdown, sc)) == NULL)
    {
    printf("%s: shutdown_hook_establish() failed\n", NAME_UNIT);
    obsd_detach(self, 0);
Index: sys/dev/pci/if_ntwoc_pci.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_ntwoc_pci.c,v
retrieving revision 1.17
diff -u -r1.17 if_ntwoc_pci.c
--- sys/dev/pci/if_ntwoc_pci.c  29 Mar 2006 04:16:50 -0000      1.17
+++ sys/dev/pci/if_ntwoc_pci.c  22 Apr 2006 17:11:02 -0000
@@ -123,7 +123,7 @@
    u_int8_t, u_int8_t);
static int ntwoc_pci_intr(void *);
static void ntwoc_pci_setup_dma(struct sca_softc *);
-static void ntwoc_pci_shutdown(void *sc);
+static void ntwoc_pci_shutdown(int howto, void *sc);

CFATTACH_DECL(ntwoc_pci, sizeof(struct ntwoc_pci_softc),
    ntwoc_pci_match, ntwoc_pci_attach, NULL, NULL);
@@ -463,7 +463,7 @@
 * boot.  Also, lower DTR on each port and disable card interrupts.
 */
static void
-ntwoc_pci_shutdown(void *aux)
+ntwoc_pci_shutdown(int howto, void *aux)
{
       struct ntwoc_pci_softc *sc = aux;
       u_int16_t fecr;
Index: sys/dev/pci/if_pcn.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_pcn.c,v
retrieving revision 1.29
diff -u -r1.29 if_pcn.c
--- sys/dev/pci/if_pcn.c        22 Feb 2006 02:57:26 -0000      1.29
+++ sys/dev/pci/if_pcn.c        22 Apr 2006 17:11:08 -0000
@@ -399,7 +399,7 @@
static int     pcn_init(struct ifnet *);
static void    pcn_stop(struct ifnet *, int);

-static void    pcn_shutdown(void *);
+static void    pcn_shutdown(int, void *);

static void    pcn_reset(struct pcn_softc *);
static void    pcn_rxdrain(struct pcn_softc *);
@@ -882,7 +882,7 @@
 *     Make sure the interface is stopped at reboot time.
 */
static void
-pcn_shutdown(void *arg)
+pcn_shutdown(int howto, void *arg)
{
       struct pcn_softc *sc = arg;

Index: sys/dev/pci/if_sip.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_sip.c,v
retrieving revision 1.107
diff -u -r1.107 if_sip.c
--- sys/dev/pci/if_sip.c        18 Apr 2006 13:07:03 -0000      1.107
+++ sys/dev/pci/if_sip.c        22 Apr 2006 17:11:15 -0000
@@ -428,7 +428,7 @@
static int     SIP_DECL(init)(struct ifnet *);
static void    SIP_DECL(stop)(struct ifnet *, int);

-static void    SIP_DECL(shutdown)(void *);
+static void    SIP_DECL(shutdown)(int, void *);

static void    SIP_DECL(reset)(struct sip_softc *);
static void    SIP_DECL(rxdrain)(struct sip_softc *);
@@ -1153,7 +1153,7 @@
 *     Make sure the interface is stopped at reboot time.
 */
static void
-SIP_DECL(shutdown)(void *arg)
+SIP_DECL(shutdown)(int howto, void *arg)
{
       struct sip_softc *sc = arg;

Index: sys/dev/pci/if_ste.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_ste.c,v
retrieving revision 1.22
diff -u -r1.22 if_ste.c
--- sys/dev/pci/if_ste.c        11 Dec 2005 12:22:49 -0000      1.22
+++ sys/dev/pci/if_ste.c        22 Apr 2006 17:11:16 -0000
@@ -210,7 +210,7 @@
static int     ste_init(struct ifnet *);
static void    ste_stop(struct ifnet *, int);

-static void    ste_shutdown(void *);
+static void    ste_shutdown(int, void *);

static void    ste_reset(struct ste_softc *, u_int32_t);
static void    ste_setthresh(struct ste_softc *);
@@ -573,7 +573,7 @@
 *     Make sure the interface is stopped at reboot time.
 */
static void
-ste_shutdown(void *arg)
+ste_shutdown(int howto, void *arg)
{
       struct ste_softc *sc = arg;

Index: sys/dev/pci/if_stge.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_stge.c,v
retrieving revision 1.32
diff -u -r1.32 if_stge.c
--- sys/dev/pci/if_stge.c       11 Dec 2005 12:22:49 -0000      1.32
+++ sys/dev/pci/if_stge.c       22 Apr 2006 17:11:24 -0000
@@ -273,7 +273,7 @@
static int     stge_init(struct ifnet *);
static void    stge_stop(struct ifnet *, int);

-static void    stge_shutdown(void *);
+static void    stge_shutdown(int, void *);

static void    stge_reset(struct stge_softc *);
static void    stge_rxdrain(struct stge_softc *);
@@ -757,7 +757,7 @@
 *     Make sure the interface is stopped at reboot time.
 */
static void
-stge_shutdown(void *arg)
+stge_shutdown(int howto, void *arg)
{
       struct stge_softc *sc = arg;

Index: sys/dev/pci/if_ti.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_ti.c,v
retrieving revision 1.70
diff -u -r1.70 if_ti.c
--- sys/dev/pci/if_ti.c 28 Mar 2006 17:38:34 -0000      1.70
+++ sys/dev/pci/if_ti.c 22 Apr 2006 17:11:29 -0000
@@ -156,7 +156,7 @@
static const struct ti_type *ti_type_match(struct pci_attach_args *);
static int ti_probe(struct device *, struct cfdata *, void *);
static void ti_attach(struct device *, struct device *, void *);
-static void ti_shutdown(void *);
+static void ti_shutdown(int, void *);
static void ti_txeof_tigon1(struct ti_softc *);
static void ti_txeof_tigon2(struct ti_softc *);
static void ti_rxeof(struct ti_softc *);
@@ -2947,7 +2947,8 @@
 * Stop all chip I/O so that the kernel's probe routines don't
 * get confused by errant DMAs when rebooting.
 */
-static void ti_shutdown(v)
+static void ti_shutdown(howto, v)
+       int howto;
       void *v;
{
       struct ti_softc         *sc = v;
Index: sys/dev/pci/if_tl.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_tl.c,v
retrieving revision 1.72
diff -u -r1.72 if_tl.c
--- sys/dev/pci/if_tl.c 24 Dec 2005 20:27:42 -0000      1.72
+++ sys/dev/pci/if_tl.c 22 Apr 2006 17:11:32 -0000
@@ -131,7 +131,7 @@
static int tl_mediachange(struct ifnet *);
static void tl_mediastatus(struct ifnet *, struct ifmediareq *);
static void tl_ifwatchdog(struct ifnet *);
-static void tl_shutdown(void*);
+static void tl_shutdown(int, void*);

static void tl_ifstart(struct ifnet *);
static void tl_reset(tl_softc_t*);
@@ -537,7 +537,8 @@
       sc->tl_mii.mii_media_status &= ~IFM_ACTIVE;
}

-static void tl_shutdown(v)
+static void tl_shutdown(howto, v)
+       int howto;
       void *v;
{
       tl_stop(v, 1);
Index: sys/dev/pci/if_txp.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_txp.c,v
retrieving revision 1.15
diff -u -r1.15 if_txp.c
--- sys/dev/pci/if_txp.c        14 Apr 2006 18:45:53 -0000      1.15
+++ sys/dev/pci/if_txp.c        22 Apr 2006 17:11:33 -0000
@@ -91,7 +91,7 @@
void txp_attach(struct device *, struct device *, void *);
int txp_intr(void *);
void txp_tick(void *);
-void txp_shutdown(void *);
+void txp_shutdown(int, void *);
int txp_ioctl(struct ifnet *, u_long, caddr_t);
void txp_start(struct ifnet *);
void txp_stop(struct txp_softc *);
@@ -929,7 +929,8 @@
}

void
-txp_shutdown(vsc)
+txp_shutdown(howto, vsc)
+       int howto;
       void *vsc;
{
       struct txp_softc *sc = (struct txp_softc *)vsc;
Index: sys/dev/pci/if_vge.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_vge.c,v
retrieving revision 1.9
diff -u -r1.9 if_vge.c
--- sys/dev/pci/if_vge.c        8 Mar 2006 23:46:27 -0000       1.9
+++ sys/dev/pci/if_vge.c        22 Apr 2006 17:11:38 -0000
@@ -143,7 +143,7 @@
static int vge_suspend         (struct device *);
static int vge_resume          (struct device *);
#endif
-static void vge_shutdown       (void *);
+static void vge_shutdown       (int, void *);
static int vge_ifmedia_upd     (struct ifnet *);
static void vge_ifmedia_sts    (struct ifnet *, struct ifmediareq *);

@@ -2277,7 +2277,8 @@
 * get confused by errant DMAs when rebooting.
 */
static void
-vge_shutdown(arg)
+vge_shutdown(howto, arg)
+       int howto;
       void *arg;
{
       struct vge_softc *sc = (struct vge_softc *)arg;
Index: sys/dev/pci/if_vr.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_vr.c,v
retrieving revision 1.75
diff -u -r1.75 if_vr.c
--- sys/dev/pci/if_vr.c 11 Dec 2005 12:22:50 -0000      1.75
+++ sys/dev/pci/if_vr.c 22 Apr 2006 17:11:40 -0000
@@ -1394,7 +1394,7 @@

static int     vr_probe(struct device *, struct cfdata *, void *);
static void    vr_attach(struct device *, struct device *, void *);
-static void    vr_shutdown(void *);
+static void    vr_shutdown(int, void *);

CFATTACH_DECL(vr, sizeof (struct vr_softc),
    vr_probe, vr_attach, NULL, NULL);
@@ -1428,7 +1428,7 @@
 * get confused by errant DMAs when rebooting.
 */
static void
-vr_shutdown(void *arg)
+vr_shutdown(int howto, void *arg)
{
       struct vr_softc *sc = (struct vr_softc *)arg;

Index: sys/dev/pci/if_wm.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_wm.c,v
retrieving revision 1.114
diff -u -r1.114 if_wm.c
--- sys/dev/pci/if_wm.c 27 Feb 2006 04:50:47 -0000      1.114
+++ sys/dev/pci/if_wm.c 22 Apr 2006 17:11:45 -0000
@@ -458,7 +458,7 @@
static int     wm_init(struct ifnet *);
static void    wm_stop(struct ifnet *, int);

-static void    wm_shutdown(void *);
+static void    wm_shutdown(int, void *);

static void    wm_reset(struct wm_softc *);
static void    wm_rxdrain(struct wm_softc *);
@@ -1376,7 +1376,7 @@
 *     Make sure the interface is stopped at reboot time.
 */
static void
-wm_shutdown(void *arg)
+wm_shutdown(int howto, void *arg)
{
       struct wm_softc *sc = arg;

Index: sys/dev/pci/mly.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/mly.c,v
retrieving revision 1.26
diff -u -r1.26 mly.c
--- sys/dev/pci/mly.c   14 Apr 2006 17:58:01 -0000      1.26
+++ sys/dev/pci/mly.c   22 Apr 2006 17:11:48 -0000
@@ -115,7 +115,7 @@
static int     mly_fwhandshake(struct mly_softc *);
static int     mly_flush(struct mly_softc *);
static int     mly_intr(void *);
-static void    mly_shutdown(void *);
+static void    mly_shutdown(int, void *);

static int     mly_alloc_ccbs(struct mly_softc *);
static void    mly_check_event(struct mly_softc *);
@@ -588,7 +588,7 @@
 * Shut down all configured `mly' devices.
 */
static void
-mly_shutdown(void *cookie)
+mly_shutdown(int howto, void *cookie)
{
       struct mly_softc *mly;
       int i;
Index: sys/dev/pci/pccbb.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/pccbb.c,v
retrieving revision 1.128
diff -u -r1.128 pccbb.c
--- sys/dev/pci/pccbb.c 5 Apr 2006 22:16:42 -0000       1.128
+++ sys/dev/pci/pccbb.c 22 Apr 2006 17:11:54 -0000
@@ -390,7 +390,7 @@
}

static void
-pccbb_shutdown(void *arg)
+pccbb_shutdown(int howto, void *arg)
{
       struct pccbb_softc *sc = arg;
       pcireg_t command;
Index: sys/dev/pcmcia/if_ray.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pcmcia/if_ray.c,v
retrieving revision 1.60
diff -u -r1.60 if_ray.c
--- sys/dev/pcmcia/if_ray.c     14 Apr 2006 17:50:27 -0000      1.60
+++ sys/dev/pcmcia/if_ray.c     22 Apr 2006 17:11:57 -0000
@@ -320,7 +320,7 @@
static void ray_reset_resetloop(void *);
static int ray_send_auth(struct ray_softc *, u_int8_t *, u_int8_t);
static void ray_set_pending(struct ray_softc *, u_int);
-static void ray_shutdown(void *);
+static void ray_shutdown(int, void *);
static int ray_simple_cmd(struct ray_softc *, u_int, u_int);
static void ray_start_assoc(struct ray_softc *);
static void ray_start_join_net(struct ray_softc *);
@@ -913,7 +913,8 @@
}

static void
-ray_shutdown(arg)
+ray_shutdown(howto, arg)
+       int howto;
       void *arg;
{
       struct ray_softc *sc;
Index: sys/dev/pcmcia/if_wi_pcmcia.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pcmcia/if_wi_pcmcia.c,v
retrieving revision 1.68
diff -u -r1.68 if_wi_pcmcia.c
--- sys/dev/pcmcia/if_wi_pcmcia.c       11 Dec 2005 12:23:23 -0000      1.68
+++ sys/dev/pcmcia/if_wi_pcmcia.c       22 Apr 2006 17:11:58 -0000
@@ -80,7 +80,7 @@
static int     wi_pcmcia_enable(struct wi_softc *);
static void    wi_pcmcia_disable(struct wi_softc *);
static void    wi_pcmcia_powerhook(int, void *);
-static void    wi_pcmcia_shutdown(void *);
+static void    wi_pcmcia_shutdown(int, void *);

/* support to download firmware for symbol CF card */
static int     wi_pcmcia_load_firm(struct wi_softc *, const void *, int, const void *, int);
@@ -424,7 +424,8 @@
}

static void
-wi_pcmcia_shutdown(arg)
+wi_pcmcia_shutdown(howto, arg)
+       int howto;
       void *arg;
{
       struct wi_pcmcia_softc *psc = arg;
Index: sys/dev/qbus/if_de.c
===================================================================
RCS file: /cvsroot/src/sys/dev/qbus/if_de.c,v
retrieving revision 1.20
diff -u -r1.20 if_de.c
--- sys/dev/qbus/if_de.c        29 Mar 2006 18:17:36 -0000      1.20
+++ sys/dev/qbus/if_de.c        22 Apr 2006 17:12:03 -0000
@@ -184,7 +184,7 @@
static void destart(struct ifnet *);
static void derecv(struct de_softc *);
static void deintr(void *);
-static void deshutdown(void *);
+static void deshutdown(int, void *);

CFATTACH_DECL(de, sizeof(struct de_softc),
    dematch, deattach, NULL, NULL);
@@ -660,7 +660,7 @@
}

void
-deshutdown(void *arg)
+deshutdown(int howto, void *arg)
{
       struct de_softc *sc = arg;

Index: sys/dev/sbus/p9100.c
===================================================================
RCS file: /cvsroot/src/sys/dev/sbus/p9100.c,v
retrieving revision 1.32
diff -u -r1.32 p9100.c
--- sys/dev/sbus/p9100.c        15 Apr 2006 17:48:23 -0000      1.32
+++ sys/dev/sbus/p9100.c        22 Apr 2006 17:12:05 -0000
@@ -160,7 +160,7 @@
static void    p9100_sbus_attach(struct device *, struct device *, void *);

static void    p9100unblank(struct device *);
-static void    p9100_shutdown(void *);
+static void    p9100_shutdown(int, void *);

CFATTACH_DECL(pnozz, sizeof(struct p9100_softc),
    p9100_sbus_match, p9100_sbus_attach, NULL, NULL);
@@ -482,7 +482,8 @@
}

static void
-p9100_shutdown(arg)
+p9100_shutdown(howto, arg)
+       int howto;
       void *arg;
{
       struct p9100_softc *sc = arg;
Index: sys/dev/scsipi/sd.c
===================================================================
RCS file: /cvsroot/src/sys/dev/scsipi/sd.c,v
retrieving revision 1.247
diff -u -r1.247 sd.c
--- sys/dev/scsipi/sd.c 30 Mar 2006 16:09:28 -0000      1.247
+++ sys/dev/scsipi/sd.c 22 Apr 2006 17:12:07 -0000
@@ -103,7 +103,7 @@
static void    sdstart(struct scsipi_periph *);
static void    sdrestart(void *);
static void    sddone(struct scsipi_xfer *, int);
-static void    sd_shutdown(void *);
+static void    sd_shutdown(int, void *);
static int     sd_interpret_sense(struct scsipi_xfer *);

static int     sd_mode_sense(struct sd_softc *, u_int8_t, void *, size_t, int,
@@ -1319,7 +1319,7 @@
}

static void
-sd_shutdown(void *arg)
+sd_shutdown(int howto, void *arg)
{
       struct sd_softc *sd = arg;

Index: sys/dev/sysmon/sysmon_wdog.c
===================================================================
RCS file: /cvsroot/src/sys/dev/sysmon/sysmon_wdog.c,v
retrieving revision 1.12
diff -u -r1.12 sysmon_wdog.c
--- sys/dev/sysmon/sysmon_wdog.c        11 Dec 2005 12:23:56 -0000      1.12
+++ sys/dev/sysmon/sysmon_wdog.c        22 Apr 2006 17:12:08 -0000
@@ -81,7 +81,7 @@
void   sysmon_wdog_release(struct sysmon_wdog *);
int    sysmon_wdog_setmode(struct sysmon_wdog *, int, u_int);
void   sysmon_wdog_ktickle(void *);
-void   sysmon_wdog_shutdown(void *);
+void   sysmon_wdog_shutdown(int, void *);

/*
 * sysmonopen_wdog:
@@ -453,7 +453,7 @@
 *     Perform shutdown-time operations.
 */
void
-sysmon_wdog_shutdown(void *arg)
+sysmon_wdog_shutdown(int howto, void *arg)
{
       struct sysmon_wdog *smw;

Index: sys/dev/usb/ehci.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/ehci.c,v
retrieving revision 1.109
diff -u -r1.109 ehci.c
--- sys/dev/usb/ehci.c  14 Apr 2006 17:27:08 -0000      1.109
+++ sys/dev/usb/ehci.c  22 Apr 2006 17:12:14 -0000
@@ -127,7 +127,7 @@
       } u;
};

-Static void            ehci_shutdown(void *);
+Static void            ehci_shutdown(int, void *);
Static void            ehci_power(int, void *);

Static usbd_status     ehci_open(usbd_pipe_handle);
@@ -1098,7 +1098,7 @@
 * Shut down the controller when the system is going down.
 */
void
-ehci_shutdown(void *v)
+ehci_shutdown(int howto, void *v)
{
       ehci_softc_t *sc = v;

Index: sys/dev/usb/ohci.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/ohci.c,v
retrieving revision 1.173
diff -u -r1.173 ohci.c
--- sys/dev/usb/ohci.c  15 Apr 2006 01:07:51 -0000      1.173
+++ sys/dev/usb/ohci.c  22 Apr 2006 17:12:17 -0000
@@ -136,7 +136,7 @@
                           ohci_softc_t *, int, int, usbd_xfer_handle,
                           ohci_soft_td_t *, ohci_soft_td_t **);

-Static void            ohci_shutdown(void *v);
+Static void            ohci_shutdown(int howto, void *v);
Static void            ohci_power(int, void *);
Static usbd_status     ohci_open(usbd_pipe_handle);
Static void            ohci_poll(struct usbd_bus *);
@@ -882,12 +882,18 @@
       sc->sc_bus.methods = &ohci_bus_methods;
       sc->sc_bus.pipe_size = sizeof(struct ohci_pipe);

-#if defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__)
       sc->sc_control = sc->sc_intre = 0;
       sc->sc_powerhook = powerhook_establish(ohci_power, sc);
       sc->sc_shutdownhook = shutdownhook_establish(ohci_shutdown, sc);
#endif

+#if defined(__OpenBSD__)
+       sc->sc_control = sc->sc_intre = 0;
+       sc->sc_powerhook = powerhook_establish(ohci_power, sc); /* XXX: Broken */
+       sc->sc_shutdownhook = shutdownhook_establish(ohci_shutdown, sc);
+#endif
+
       usb_callout_init(sc->sc_tmo_rhsc);

       /* Finally, turn on interrupts. */
@@ -989,7 +995,7 @@
 * Shut down the controller when the system is going down.
 */
void
-ohci_shutdown(void *v)
+ohci_shutdown(int howto, void *v)
{
       ohci_softc_t *sc = v;

Index: sys/dev/usb/uhci.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/uhci.c,v
retrieving revision 1.195
diff -u -r1.195 uhci.c
--- sys/dev/usb/uhci.c  14 Apr 2006 16:31:27 -0000      1.195
+++ sys/dev/usb/uhci.c  22 Apr 2006 17:12:23 -0000
@@ -165,7 +165,7 @@
Static void            uhci_globalreset(uhci_softc_t *);
Static usbd_status     uhci_portreset(uhci_softc_t*, int);
Static void            uhci_reset(uhci_softc_t *);
-Static void            uhci_shutdown(void *v);
+Static void            uhci_shutdown(int howto, void *v);
Static void            uhci_power(int, void *);
Static usbd_status     uhci_run(uhci_softc_t *, int run);
Static uhci_soft_td_t  *uhci_alloc_std(uhci_softc_t *);
@@ -525,12 +525,17 @@
       sc->sc_bus.methods = &uhci_bus_methods;
       sc->sc_bus.pipe_size = sizeof(struct uhci_pipe);

-#if defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__)
       sc->sc_suspend = PWR_RESUME;
       sc->sc_powerhook = powerhook_establish(uhci_power, sc);
       sc->sc_shutdownhook = shutdownhook_establish(uhci_shutdown, sc);
#endif

+#if defined(__OpenBSD__)
+       sc->sc_suspend = PWR_RESUME;
+       sc->sc_powerhook = powerhook_establish(uhci_power, sc);
+       sc->sc_shutdownhook = shutdownhook_establish(uhci_shutdown, sc); /* XXX: Broken */
+#endif
       UHCICMD(sc, UHCI_CMD_MAXP); /* Assume 64 byte packets at frame end */

       DPRINTFN(1,("uhci_init: enabling\n"));
@@ -695,7 +700,7 @@
 * Shut down the controller when the system is going down.
 */
void
-uhci_shutdown(void *v)
+uhci_shutdown(int howto, void *v)
{
       uhci_softc_t *sc = v;
       int s;
Index: sys/dev/wscons/wsdisplay.c
===================================================================
RCS file: /cvsroot/src/sys/dev/wscons/wsdisplay.c,v
retrieving revision 1.97
diff -u -r1.97 wsdisplay.c
--- sys/dev/wscons/wsdisplay.c  15 Apr 2006 17:48:24 -0000      1.97
+++ sys/dev/wscons/wsdisplay.c  22 Apr 2006 17:12:24 -0000
@@ -103,7 +103,7 @@
                                int, int, long);
void wsscreen_detach(struct wsscreen *);
int wsdisplay_addscreen(struct wsdisplay_softc *, int, const char *, const char *);
-static void wsdisplay_shutdownhook(void *);
+static void wsdisplay_shutdownhook(int, void *);
static void wsdisplay_addscreen_print(struct wsdisplay_softc *, int, int);
static void wsdisplay_closescreen(struct wsdisplay_softc *, struct wsscreen *);
int wsdisplay_delscreen(struct wsdisplay_softc *, int, int);
@@ -1999,7 +1999,7 @@
 * Switch the console at shutdown.
 */
static void
-wsdisplay_shutdownhook(void *arg)
+wsdisplay_shutdownhook(int howto, void *arg)
{

       wsdisplay_switchtoconsole();