summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-08-27 04:09:22 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-08-27 04:09:22 +0000
commitd387be6d508d997d7cd2ffeac58f75c47618216d (patch)
treec5f66108585edf04cc43414ac9632c803e34db11 /sys
parent787f4bab8db19e23ffad9ba4a801d990bf04121a (diff)
kill PWR_STANDBY (apm can use PWR_SUSPEND instead). While here, renumber
PWR_{SUSPEND,RESUME} so that they match the values of DAVCT_{SUSPEND,RESUME} so that we can eventually (many more steps...) kill the powerhook garbage and use the activate mechanism. no objections
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/apm.c4
-rw-r--r--sys/dev/acpi/acpiasus.c3
-rw-r--r--sys/dev/ic/ath.c3
-rw-r--r--sys/dev/ic/atw.c5
-rw-r--r--sys/dev/ic/pgt.c3
-rw-r--r--sys/dev/ic/rt2560.c3
-rw-r--r--sys/dev/ic/rt2661.c3
-rw-r--r--sys/dev/ic/rt2860.c3
-rw-r--r--sys/dev/ic/rtw.c5
-rw-r--r--sys/dev/pci/esa.c3
-rw-r--r--sys/dev/pci/pccbb.c4
-rw-r--r--sys/dev/sdmmc/sdhc.c3
-rw-r--r--sys/dev/usb/ehci.c3
-rw-r--r--sys/dev/usb/ohci.c3
-rw-r--r--sys/dev/usb/uhci.c3
-rw-r--r--sys/sys/systm.h7
16 files changed, 20 insertions, 38 deletions
diff --git a/sys/arch/i386/i386/apm.c b/sys/arch/i386/i386/apm.c
index 830e998196f..7fcb28810c8 100644
--- a/sys/arch/i386/i386/apm.c
+++ b/sys/arch/i386/i386/apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apm.c,v 1.88 2010/07/25 21:43:35 deraadt Exp $ */
+/* $OpenBSD: apm.c,v 1.89 2010/08/27 04:09:11 deraadt Exp $ */
/*-
* Copyright (c) 1998-2001 Michael Shalayeff. All rights reserved.
@@ -341,7 +341,7 @@ apm_standby()
#endif /* NWSDISPLAY > 0 */
bufq_quiesce();
- dopowerhooks(PWR_STANDBY);
+ dopowerhooks(PWR_SUSPEND);
if (cold)
vfs_syncwait(0);
diff --git a/sys/dev/acpi/acpiasus.c b/sys/dev/acpi/acpiasus.c
index 92afc017f21..89183c180d4 100644
--- a/sys/dev/acpi/acpiasus.c
+++ b/sys/dev/acpi/acpiasus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpiasus.c,v 1.9 2010/07/06 06:26:25 deraadt Exp $ */
+/* $OpenBSD: acpiasus.c,v 1.10 2010/08/27 04:09:17 deraadt Exp $ */
/* $NetBSD: asus_acpi.c,v 1.2.2.2 2008/04/03 12:42:37 mjf Exp $ */
/*
* Copyright (c) 2007, 2008 Jared D. McNeill <jmcneill@invisible.ca>
@@ -223,7 +223,6 @@ acpiasus_power(int why, void *arg)
struct aml_value ret;
switch (why) {
- case PWR_STANDBY:
case PWR_SUSPEND:
break;
case PWR_RESUME:
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c
index c25a9f40c52..bf43d6769f9 100644
--- a/sys/dev/ic/ath.c
+++ b/sys/dev/ic/ath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ath.c,v 1.87 2010/08/04 21:02:24 deraadt Exp $ */
+/* $OpenBSD: ath.c,v 1.88 2010/08/27 04:09:18 deraadt Exp $ */
/* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */
/*-
@@ -498,7 +498,6 @@ ath_power(int why, void *arg)
s = splnet();
switch (why) {
case PWR_SUSPEND:
- case PWR_STANDBY:
ath_suspend(sc, why);
break;
case PWR_RESUME:
diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c
index 8eed8498ac4..71a1e00e994 100644
--- a/sys/dev/ic/atw.c
+++ b/sys/dev/ic/atw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atw.c,v 1.69 2009/08/16 18:03:48 jsg Exp $ */
+/* $OpenBSD: atw.c,v 1.70 2010/08/27 04:09:18 deraadt Exp $ */
/* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */
/*-
@@ -3994,9 +3994,6 @@ atw_power(int why, void *arg)
s = splnet();
switch (why) {
- case PWR_STANDBY:
- /* XXX do nothing. */
- break;
case PWR_SUSPEND:
atw_stop(ifp, 1);
if (sc->sc_power != NULL)
diff --git a/sys/dev/ic/pgt.c b/sys/dev/ic/pgt.c
index 99c0a35f4c2..6c1026b25c3 100644
--- a/sys/dev/ic/pgt.c
+++ b/sys/dev/ic/pgt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pgt.c,v 1.61 2010/08/07 16:16:18 kettenis Exp $ */
+/* $OpenBSD: pgt.c,v 1.62 2010/08/27 04:09:18 deraadt Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -3325,7 +3325,6 @@ pgt_power(int why, void *arg)
s = splnet();
switch (why) {
- case PWR_STANDBY:
case PWR_SUSPEND:
pgt_stop(sc, SC_NEEDS_RESET);
pgt_update_hw_from_sw(sc, 0, 0);
diff --git a/sys/dev/ic/rt2560.c b/sys/dev/ic/rt2560.c
index 258059d8aad..3c89d008f8f 100644
--- a/sys/dev/ic/rt2560.c
+++ b/sys/dev/ic/rt2560.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2560.c,v 1.50 2010/08/25 21:37:59 kettenis Exp $ */
+/* $OpenBSD: rt2560.c,v 1.51 2010/08/27 04:09:18 deraadt Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -2738,7 +2738,6 @@ rt2560_power(int why, void *arg)
s = splnet();
switch (why) {
case PWR_SUSPEND:
- case PWR_STANDBY:
rt2560_stop(ifp, 0);
if (sc->sc_power != NULL)
(*sc->sc_power)(sc, why);
diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c
index 541d2941719..2296fab42a5 100644
--- a/sys/dev/ic/rt2661.c
+++ b/sys/dev/ic/rt2661.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2661.c,v 1.56 2010/08/25 21:37:59 kettenis Exp $ */
+/* $OpenBSD: rt2661.c,v 1.57 2010/08/27 04:09:18 deraadt Exp $ */
/*-
* Copyright (c) 2006
@@ -2933,7 +2933,6 @@ rt2661_power(int why, void *arg)
s = splnet();
switch (why) {
case PWR_SUSPEND:
- case PWR_STANDBY:
rt2661_stop(ifp, 0);
if (sc->sc_power != NULL)
(*sc->sc_power)(sc, why);
diff --git a/sys/dev/ic/rt2860.c b/sys/dev/ic/rt2860.c
index 3dc0d81a66c..0eebcaa095d 100644
--- a/sys/dev/ic/rt2860.c
+++ b/sys/dev/ic/rt2860.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2860.c,v 1.58 2010/08/25 21:37:59 kettenis Exp $ */
+/* $OpenBSD: rt2860.c,v 1.59 2010/08/27 04:09:18 deraadt Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -3873,7 +3873,6 @@ rt2860_power(int why, void *arg)
s = splnet();
switch (why) {
case PWR_SUSPEND:
- case PWR_STANDBY:
rt2860_stop(ifp, 0);
if (sc->sc_power != NULL)
(*sc->sc_power)(sc, why);
diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c
index c8cb26389d5..6b4961366c0 100644
--- a/sys/dev/ic/rtw.c
+++ b/sys/dev/ic/rtw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtw.c,v 1.78 2009/11/24 00:28:22 deraadt Exp $ */
+/* $OpenBSD: rtw.c,v 1.79 2010/08/27 04:09:19 deraadt Exp $ */
/* $NetBSD: rtw.c,v 1.29 2004/12/27 19:49:16 dyoung Exp $ */
/*-
@@ -3605,9 +3605,6 @@ rtw_power(int why, void *arg)
s = splnet();
switch (why) {
- case PWR_STANDBY:
- /* XXX do nothing. */
- break;
case PWR_SUSPEND:
rtw_stop(ifp, 1);
if (sc->sc_power != NULL)
diff --git a/sys/dev/pci/esa.c b/sys/dev/pci/esa.c
index 1f9413cdbbf..95ea0753502 100644
--- a/sys/dev/pci/esa.c
+++ b/sys/dev/pci/esa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: esa.c,v 1.19 2010/07/15 03:43:11 jakemsr Exp $ */
+/* $OpenBSD: esa.c,v 1.20 2010/08/27 04:09:19 deraadt Exp $ */
/* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */
/*
@@ -1611,7 +1611,6 @@ esa_powerhook(int why, void *hdl)
switch (why) {
case PWR_SUSPEND:
- case PWR_STANDBY:
esa_suspend(sc);
break;
case PWR_RESUME:
diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c
index 499be28f01b..144d4646100 100644
--- a/sys/dev/pci/pccbb.c
+++ b/sys/dev/pci/pccbb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pccbb.c,v 1.77 2010/08/25 21:37:59 kettenis Exp $ */
+/* $OpenBSD: pccbb.c,v 1.78 2010/08/27 04:09:20 deraadt Exp $ */
/* $NetBSD: pccbb.c,v 1.96 2004/03/28 09:49:31 nakayama Exp $ */
/*
@@ -2828,7 +2828,7 @@ pccbb_powerhook(int why, void *arg)
DPRINTF(("%s: power: why %d\n", sc->sc_dev.dv_xname, why));
- if (why == PWR_SUSPEND || why == PWR_STANDBY) {
+ if (why == PWR_SUSPEND) {
DPRINTF(("%s: power: why %d stopping intr\n",
sc->sc_dev.dv_xname, why));
if (sc->sc_pil_intr_enable) {
diff --git a/sys/dev/sdmmc/sdhc.c b/sys/dev/sdmmc/sdhc.c
index e7177c16cd0..0f90fdf4eae 100644
--- a/sys/dev/sdmmc/sdhc.c
+++ b/sys/dev/sdmmc/sdhc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdhc.c,v 1.28 2010/08/19 17:54:12 jasper Exp $ */
+/* $OpenBSD: sdhc.c,v 1.29 2010/08/27 04:09:20 deraadt Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -259,7 +259,6 @@ sdhc_power(int why, void *arg)
int n, i;
switch(why) {
- case PWR_STANDBY:
case PWR_SUSPEND:
/* XXX poll for command completion or suspend command
* in progress */
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index 4986271eb89..c64ada9f4ca 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci.c,v 1.106 2009/11/26 12:27:48 deraadt Exp $ */
+/* $OpenBSD: ehci.c,v 1.107 2010/08/27 04:09:20 deraadt Exp $ */
/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */
/*
@@ -1074,7 +1074,6 @@ ehci_power(int why, void *v)
s = splhardusb();
switch (why) {
case PWR_SUSPEND:
- case PWR_STANDBY:
sc->sc_bus.use_polling++;
for (i = 1; i <= sc->sc_noport; i++) {
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index b73a1be666c..713b5a9344d 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.95 2010/05/01 19:43:57 jsg Exp $ */
+/* $OpenBSD: ohci.c,v 1.96 2010/08/27 04:09:20 deraadt Exp $ */
/* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
@@ -997,7 +997,6 @@ ohci_power(int why, void *v)
s = splhardusb();
switch (why) {
case PWR_SUSPEND:
- case PWR_STANDBY:
sc->sc_bus.use_polling++;
reg = OREAD4(sc, OHCI_CONTROL) & ~OHCI_HCFS_MASK;
if (sc->sc_control == 0) {
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index c3adf3c8b1b..a179b25c21c 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci.c,v 1.75 2010/05/01 19:43:57 jsg Exp $ */
+/* $OpenBSD: uhci.c,v 1.76 2010/08/27 04:09:21 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 $ */
@@ -697,7 +697,6 @@ uhci_power(int why, void *v)
switch (why) {
case PWR_SUSPEND:
- case PWR_STANDBY:
#ifdef UHCI_DEBUG
if (uhcidebug > 2)
uhci_dumpregs(sc);
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index 057668b9fa8..1bfc65dd199 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: systm.h,v 1.82 2010/08/20 22:03:22 matthew Exp $ */
+/* $OpenBSD: systm.h,v 1.83 2010/08/27 04:09:21 deraadt Exp $ */
/* $NetBSD: systm.h,v 1.50 1996/06/09 04:55:09 briggs Exp $ */
/*-
@@ -300,9 +300,8 @@ void dohooks(struct hook_desc_head *, int);
void *powerhook_establish(void (*)(int, void *), void *);
void powerhook_disestablish(void *);
void dopowerhooks(int);
-#define PWR_RESUME 0
-#define PWR_SUSPEND 1
-#define PWR_STANDBY 2
+#define PWR_RESUME 3
+#define PWR_SUSPEND 2
struct uio;
int uiomove(void *, int, struct uio *);