summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2009-11-24 23:01:42 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2009-11-24 23:01:42 +0000
commit143331302a36ff62a4f7c84205fc0f972c0b3902 (patch)
treefeb948af3a67dcebe1fcd18cc9d3dfec4e162256 /sys/dev/acpi
parent2f0ce4d04f04d749ad2aa5bd5aa2551210aeecfb (diff)
in the resume path evaluate _WAK before dealing with device drivers
like the spec says, not after. ok mlarkin@
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r--sys/dev/acpi/acpi.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index 7bcc3679743..052c782991f 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.149 2009/11/24 16:12:37 deraadt Exp $ */
+/* $OpenBSD: acpi.c,v 1.150 2009/11/24 23:01:41 jsg Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -1916,6 +1916,12 @@ acpi_resume(struct acpi_softc *sc, int state)
DEVNAME(sc));
}
+ if (sc->sc_wak)
+ if (aml_evalnode(sc, sc->sc_wak, 1, &env, NULL) != 0) {
+ dnprintf(10, "%s evaluating method _WAK failed.\n",
+ DEVNAME(sc));
+ }
+
/* Disable wake GPEs */
acpi_susp_resume_gpewalk(sc, state, 0);
@@ -1924,12 +1930,6 @@ acpi_resume(struct acpi_softc *sc, int state)
enable_intr();
splx(acpi_saved_spl);
- if (sc->sc_wak)
- if (aml_evalnode(sc, sc->sc_wak, 1, &env, NULL) != 0) {
- dnprintf(10, "%s evaluating method _WAK failed.\n",
- DEVNAME(sc));
- }
-
sc->sc_state = ACPI_STATE_S0;
if (sc->sc_tts) {
env.v_integer = sc->sc_state;