diff options
-rw-r--r-- | sys/arch/beagle/dev/ommmc.c | 6 | ||||
-rw-r--r-- | sys/dev/cardbus/if_acx_cardbus.c | 4 | ||||
-rw-r--r-- | sys/dev/cardbus/if_ath_cardbus.c | 4 | ||||
-rw-r--r-- | sys/dev/cardbus/if_athn_cardbus.c | 4 | ||||
-rw-r--r-- | sys/dev/cardbus/if_atw_cardbus.c | 4 | ||||
-rw-r--r-- | sys/dev/cardbus/if_pgt_cardbus.c | 6 | ||||
-rw-r--r-- | sys/dev/cardbus/if_re_cardbus.c | 4 | ||||
-rw-r--r-- | sys/dev/cardbus/if_rtw_cardbus.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/atw.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/i82365.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/rt2560.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/rt2661.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/rt2860.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/auich.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/pci.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/yds.c | 4 | ||||
-rw-r--r-- | sys/dev/pcmcia/if_ray.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/uhci.c | 8 | ||||
-rw-r--r-- | sys/kern/kern_subr.c | 4 | ||||
-rw-r--r-- | sys/sys/systm.h | 4 |
20 files changed, 49 insertions, 51 deletions
diff --git a/sys/arch/beagle/dev/ommmc.c b/sys/arch/beagle/dev/ommmc.c index 311a184cb05..b4f9bfcf8e0 100644 --- a/sys/arch/beagle/dev/ommmc.c +++ b/sys/arch/beagle/dev/ommmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ommmc.c,v 1.7 2010/08/27 05:04:08 deraadt Exp $ */ +/* $OpenBSD: ommmc.c,v 1.8 2010/09/06 19:20:19 deraadt Exp $ */ /* * Copyright (c) 2009 Dale Rahn <drahn@openbsd.org> @@ -516,7 +516,7 @@ ommmc_power(int why, void *arg) #endif switch(why) { - case PWR_SUSPEND: + case DVACT_SUSPEND: /* XXX poll for command completion or suspend command * in progress */ @@ -527,7 +527,7 @@ ommmc_power(int why, void *arg) #endif break; - case PWR_RESUME: + case DVACT_RESUME: /* Restore the host controller state. */ #if 0 (void)ommmc_host_reset(sc); diff --git a/sys/dev/cardbus/if_acx_cardbus.c b/sys/dev/cardbus/if_acx_cardbus.c index 328ab68a922..cf2268b45fd 100644 --- a/sys/dev/cardbus/if_acx_cardbus.c +++ b/sys/dev/cardbus/if_acx_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_acx_cardbus.c,v 1.18 2010/03/27 21:40:13 jsg Exp $ */ +/* $OpenBSD: if_acx_cardbus.c,v 1.19 2010/09/06 19:20:21 deraadt Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -272,7 +272,7 @@ acx_cardbus_power(struct acx_softc *sc, int why) { struct acx_cardbus_softc *csc = (struct acx_cardbus_softc *)sc; - if (why == PWR_RESUME) { + if (why == DVACT_RESUME) { /* kick the PCI configuration registers */ acx_cardbus_setup(csc); } diff --git a/sys/dev/cardbus/if_ath_cardbus.c b/sys/dev/cardbus/if_ath_cardbus.c index 37a59ba1ae4..8f7e7c8e812 100644 --- a/sys/dev/cardbus/if_ath_cardbus.c +++ b/sys/dev/cardbus/if_ath_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ath_cardbus.c,v 1.15 2010/03/27 21:40:13 jsg Exp $ */ +/* $OpenBSD: if_ath_cardbus.c,v 1.16 2010/09/06 19:20:21 deraadt Exp $ */ /* $NetBSD: if_ath_cardbus.c,v 1.4 2004/08/02 19:14:28 mycroft Exp $ */ /* @@ -268,7 +268,7 @@ ath_cardbus_disable(struct ath_softc *sc) void ath_cardbus_power(struct ath_softc *sc, int why) { - if (why == PWR_RESUME) + if (why == DVACT_RESUME) ath_enable(sc); } diff --git a/sys/dev/cardbus/if_athn_cardbus.c b/sys/dev/cardbus/if_athn_cardbus.c index 5aced8327dd..57304f84291 100644 --- a/sys/dev/cardbus/if_athn_cardbus.c +++ b/sys/dev/cardbus/if_athn_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_athn_cardbus.c,v 1.9 2010/05/16 15:06:22 damien Exp $ */ +/* $OpenBSD: if_athn_cardbus.c,v 1.10 2010/09/06 19:20:21 deraadt Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -212,7 +212,7 @@ athn_cardbus_power(struct athn_softc *sc, int why) { struct athn_cardbus_softc *csc = (struct athn_cardbus_softc *)sc; - if (why == PWR_RESUME) { + if (why == DVACT_RESUME) { /* Restore the PCI configuration registers. */ athn_cardbus_setup(csc); } diff --git a/sys/dev/cardbus/if_atw_cardbus.c b/sys/dev/cardbus/if_atw_cardbus.c index f1d587b7b88..dc145ec762e 100644 --- a/sys/dev/cardbus/if_atw_cardbus.c +++ b/sys/dev/cardbus/if_atw_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_atw_cardbus.c,v 1.18 2010/03/27 21:40:13 jsg Exp $ */ +/* $OpenBSD: if_atw_cardbus.c,v 1.19 2010/09/06 19:20:21 deraadt Exp $ */ /* $NetBSD: if_atw_cardbus.c,v 1.9 2004/07/23 07:07:55 dyoung Exp $ */ /*- @@ -312,7 +312,7 @@ atw_cardbus_disable(struct atw_softc *sc) void atw_cardbus_power(struct atw_softc *sc, int why) { - if (why == PWR_RESUME) + if (why == DVACT_RESUME) atw_enable(sc); } diff --git a/sys/dev/cardbus/if_pgt_cardbus.c b/sys/dev/cardbus/if_pgt_cardbus.c index 5c3f6d4c4f1..ebf13d2f8ac 100644 --- a/sys/dev/cardbus/if_pgt_cardbus.c +++ b/sys/dev/cardbus/if_pgt_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pgt_cardbus.c,v 1.12 2010/08/27 20:06:38 deraadt Exp $ */ +/* $OpenBSD: if_pgt_cardbus.c,v 1.13 2010/09/06 19:20:21 deraadt Exp $ */ /* * Copyright (c) 2006 Marcus Glocker <mglocker@openbsd.org> @@ -218,10 +218,10 @@ pgt_cardbus_disable(struct pgt_softc *sc) void pgt_cardbus_power(struct pgt_softc *sc, int why) { - if (why == PWR_RESUME) + if (why == DVACT_RESUME) if (sc->sc_enable != NULL) (*sc->sc_enable)(sc); - if (why == PWR_SUSPEND) + if (why == DVACT_SUSPEND) if (sc->sc_disable != NULL) (*sc->sc_disable)(sc); } diff --git a/sys/dev/cardbus/if_re_cardbus.c b/sys/dev/cardbus/if_re_cardbus.c index 068942868e9..2bde9691594 100644 --- a/sys/dev/cardbus/if_re_cardbus.c +++ b/sys/dev/cardbus/if_re_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_re_cardbus.c,v 1.19 2010/03/27 21:40:13 jsg Exp $ */ +/* $OpenBSD: if_re_cardbus.c,v 1.20 2010/09/06 19:20:21 deraadt Exp $ */ /* * Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org> @@ -280,6 +280,6 @@ re_cardbus_powerhook(int why, void *arg) struct rl_softc *sc = arg; struct ifnet *ifp = &sc->sc_arpcom.ac_if; - if (why == PWR_RESUME) + if (why == DVACT_RESUME) re_init(ifp); } diff --git a/sys/dev/cardbus/if_rtw_cardbus.c b/sys/dev/cardbus/if_rtw_cardbus.c index 9aaaf0f7d82..be7525eca81 100644 --- a/sys/dev/cardbus/if_rtw_cardbus.c +++ b/sys/dev/cardbus/if_rtw_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rtw_cardbus.c,v 1.18 2010/03/27 21:40:13 jsg Exp $ */ +/* $OpenBSD: if_rtw_cardbus.c,v 1.19 2010/09/06 19:20:21 deraadt Exp $ */ /* $NetBSD: if_rtw_cardbus.c,v 1.4 2004/12/20 21:05:34 dyoung Exp $ */ /*- @@ -383,7 +383,7 @@ rtw_cardbus_power(struct rtw_softc *sc, int why) RTW_DPRINTF(RTW_DEBUG_ATTACH, ("%s: rtw_cardbus_power\n", sc->sc_dev.dv_xname)); - if (why == PWR_RESUME) + if (why == DVACT_RESUME) rtw_enable(sc); } diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c index 6cf9487474f..f13e7f3818d 100644 --- a/sys/dev/ic/atw.c +++ b/sys/dev/ic/atw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atw.c,v 1.71 2010/08/29 16:46:58 deraadt Exp $ */ +/* $OpenBSD: atw.c,v 1.72 2010/09/06 19:20:21 deraadt Exp $ */ /* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */ /*- @@ -3985,13 +3985,13 @@ atw_activate(struct device *self, int act) struct ifnet *ifp = &sc->sc_ic.ic_if; switch (act) { - case PWR_SUSPEND: + case DVACT_SUSPEND: if (ifp->if_flags & IFF_RUNNING) atw_stop(ifp, 1); if (sc->sc_power != NULL) (*sc->sc_power)(sc, act); break; - case PWR_RESUME: + case DVACT_RESUME: workq_queue_task(NULL, &sc->sc_resume_wqt, 0, atw_resume, sc, NULL); break; diff --git a/sys/dev/ic/i82365.c b/sys/dev/ic/i82365.c index 36ef617a2b4..47a30f2048c 100644 --- a/sys/dev/ic/i82365.c +++ b/sys/dev/ic/i82365.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i82365.c,v 1.28 2009/08/02 17:20:08 blambert Exp $ */ +/* $OpenBSD: i82365.c,v 1.29 2010/09/06 19:20:21 deraadt Exp $ */ /* $NetBSD: i82365.c,v 1.10 1998/06/09 07:36:55 thorpej Exp $ */ /* @@ -837,7 +837,7 @@ pcic_power(why, arg) struct pcic_softc *sc = (struct pcic_softc *)h->ph_parent; struct pcic_event *pe; - if (why != PWR_RESUME) { + if (why != DVACT_RESUME) { timeout_del(&sc->poll_timeout); } else { diff --git a/sys/dev/ic/rt2560.c b/sys/dev/ic/rt2560.c index 730e02df478..c95dc0e22d1 100644 --- a/sys/dev/ic/rt2560.c +++ b/sys/dev/ic/rt2560.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2560.c,v 1.55 2010/09/06 18:22:00 kettenis Exp $ */ +/* $OpenBSD: rt2560.c,v 1.56 2010/09/06 19:20:21 deraadt Exp $ */ /*- * Copyright (c) 2005, 2006 @@ -2740,10 +2740,10 @@ rt2560_powerhook(int why, void *arg) s = splnet(); switch (why) { - case PWR_SUSPEND: + case DVACT_SUSPEND: rt2560_suspend(sc); break; - case PWR_RESUME: + case DVACT_RESUME: rt2560_resume(sc); break; } diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c index fffb8a640a7..e7231b0281d 100644 --- a/sys/dev/ic/rt2661.c +++ b/sys/dev/ic/rt2661.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2661.c,v 1.61 2010/09/06 18:22:02 kettenis Exp $ */ +/* $OpenBSD: rt2661.c,v 1.62 2010/09/06 19:20:21 deraadt Exp $ */ /*- * Copyright (c) 2006 @@ -2934,10 +2934,10 @@ rt2661_powerhook(int why, void *arg) s = splnet(); switch (why) { - case PWR_SUSPEND: + case DVACT_SUSPEND: rt2661_suspend(sc); break; - case PWR_RESUME: + case DVACT_RESUME: rt2661_resume(sc); break; } diff --git a/sys/dev/ic/rt2860.c b/sys/dev/ic/rt2860.c index 859cfe71bca..172b3ad87a1 100644 --- a/sys/dev/ic/rt2860.c +++ b/sys/dev/ic/rt2860.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2860.c,v 1.62 2010/08/28 18:08:07 deraadt Exp $ */ +/* $OpenBSD: rt2860.c,v 1.63 2010/09/06 19:20:22 deraadt Exp $ */ /*- * Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr> @@ -3872,10 +3872,10 @@ rt2860_powerhook(int why, void *arg) s = splnet(); switch (why) { - case PWR_SUSPEND: + case DVACT_SUSPEND: rt2860_suspend(sc); break; - case PWR_RESUME: + case DVACT_RESUME: rt2860_resume(sc); break; } diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c index a27ce5b68cb..9e7ea163089 100644 --- a/sys/dev/pci/auich.c +++ b/sys/dev/pci/auich.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auich.c,v 1.89 2010/08/31 17:13:44 deraadt Exp $ */ +/* $OpenBSD: auich.c,v 1.90 2010/09/06 19:20:22 deraadt Exp $ */ /* * Copyright (c) 2000,2001 Michael Shalayeff @@ -555,7 +555,7 @@ auich_attach(parent, self, aux) sc->audiodev = audio_attach_mi(&auich_hw_if, sc, &sc->sc_dev); /* Watch for power changes */ - sc->suspend = PWR_RESUME; + sc->suspend = DVACT_RESUME; sc->powerhook = powerhook_establish(auich_powerhook, sc); sc->sc_ac97rate = -1; diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 6a88d510961..46d4fd8b39c 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci.c,v 1.84 2010/09/05 18:14:33 kettenis Exp $ */ +/* $OpenBSD: pci.c,v 1.85 2010/09/06 19:20:23 deraadt Exp $ */ /* $NetBSD: pci.c,v 1.31 1997/06/06 23:48:04 thorpej Exp $ */ /* @@ -218,10 +218,10 @@ void pcipowerhook(int why, void *arg) { switch (why) { - case PWR_SUSPEND: + case DVACT_SUSPEND: pci_suspend(arg); break; - case PWR_RESUME: + case DVACT_RESUME: pci_resume(arg); break; } diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c index ad2a339d462..530c5bf1c88 100644 --- a/sys/dev/pci/yds.c +++ b/sys/dev/pci/yds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yds.c,v 1.35 2010/08/27 18:50:57 deraadt Exp $ */ +/* $OpenBSD: yds.c,v 1.36 2010/09/06 19:20:23 deraadt Exp $ */ /* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */ /* @@ -822,7 +822,7 @@ yds_attachhook(void *xsc) audio_attach_mi(&yds_hw_if, sc, &sc->sc_dev); /* Watch for power changes */ - sc->suspend = PWR_RESUME; + sc->suspend = DVACT_RESUME; sc->powerhook = powerhook_establish(yds_powerhook, sc); yds_configure_legacy(sc); diff --git a/sys/dev/pcmcia/if_ray.c b/sys/dev/pcmcia/if_ray.c index c6eefbfa63c..c12366b7b73 100644 --- a/sys/dev/pcmcia/if_ray.c +++ b/sys/dev/pcmcia/if_ray.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ray.c,v 1.43 2010/08/30 20:33:18 deraadt Exp $ */ +/* $OpenBSD: if_ray.c,v 1.44 2010/09/06 19:20:23 deraadt Exp $ */ /* $NetBSD: if_ray.c,v 1.21 2000/07/05 02:35:54 onoe Exp $ */ /* @@ -899,11 +899,11 @@ ray_power(int why, void *arg) /* can't do this until power hooks are called from thread */ sc = arg; switch (why) { - case PWR_RESUME: + case DVACT_RESUME: if ((sc->sc_flags & RAY_FLAGS_RESUMEINIT)) ray_init(sc); break; - case PWR_SUSPEND: + case DVACT_SUSPEND: if ((sc->sc_if.if_flags & IFF_RUNNING)) { ray_stop(sc); sc->sc_flags |= RAY_FLAGS_RESUMEINIT; diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index d8700a45649..dbd32360ace 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhci.c,v 1.79 2010/08/31 16:47:36 deraadt Exp $ */ +/* $OpenBSD: uhci.c,v 1.80 2010/09/06 19:20:24 deraadt Exp $ */ /* $NetBSD: uhci.c,v 1.172 2003/02/23 04:19:26 simonb Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */ @@ -507,7 +507,7 @@ uhci_init(uhci_softc_t *sc) sc->sc_bus.methods = &uhci_bus_methods; sc->sc_bus.pipe_size = sizeof(struct uhci_pipe); - sc->sc_suspend = PWR_RESUME; + sc->sc_suspend = DVACT_RESUME; sc->sc_powerhook = powerhook_establish(uhci_powerhook, sc); sc->sc_shutdownhook = shutdownhook_establish(uhci_shutdown, sc); @@ -552,7 +552,7 @@ uhci_activate(struct device *self, int act) break; case DVACT_RESUME: #ifdef DIAGNOSTIC - if (sc->sc_suspend == PWR_RESUME) + if (sc->sc_suspend == DVACT_RESUME) printf("uhci_powerhook: weird, resume without suspend.\n"); #endif sc->sc_bus.use_polling++; @@ -1172,7 +1172,7 @@ uhci_intr1(uhci_softc_t *sc) } #endif - if (sc->sc_suspend != PWR_RESUME) { + if (sc->sc_suspend != DVACT_RESUME) { printf("%s: interrupt while not operating ignored\n", sc->sc_bus.bdev.dv_xname); UWRITE2(sc, UHCI_STS, status); /* acknowledge the ints */ diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index 5f7cfb6f0e6..71242e0d59b 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_subr.c,v 1.32 2008/06/12 16:15:49 marco Exp $ */ +/* $OpenBSD: kern_subr.c,v 1.33 2010/09/06 19:20:24 deraadt Exp $ */ /* $NetBSD: kern_subr.c,v 1.15 1996/04/09 17:21:56 ragge Exp $ */ /* @@ -307,7 +307,7 @@ dopowerhooks(int why) int s; s = splhigh(); - if (why == PWR_RESUME) { + if (why == DVACT_RESUME) { CIRCLEQ_FOREACH_REVERSE(dp, &powerhook_list, sfd_list) { (*dp->sfd_fn)(why, dp->sfd_arg); } diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 1bfc65dd199..c81319b1197 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: systm.h,v 1.83 2010/08/27 04:09:21 deraadt Exp $ */ +/* $OpenBSD: systm.h,v 1.84 2010/09/06 19:20:24 deraadt Exp $ */ /* $NetBSD: systm.h,v 1.50 1996/06/09 04:55:09 briggs Exp $ */ /*- @@ -300,8 +300,6 @@ void dohooks(struct hook_desc_head *, int); void *powerhook_establish(void (*)(int, void *), void *); void powerhook_disestablish(void *); void dopowerhooks(int); -#define PWR_RESUME 3 -#define PWR_SUSPEND 2 struct uio; int uiomove(void *, int, struct uio *); |