summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2022-02-15 02:29:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2022-02-15 02:29:24 +0000
commit4c9416fe0b54a36c5e3c1d886f68701e9c0977a7 (patch)
treee873f44641650ebca4ce775b9e50f0711134fc80 /sys/dev/acpi
parent989836bd37f26a56bf846b45862c3b2ffcc355bf (diff)
The DVACT_POWERDOWN step was accidentally moved in relation to some MD
steps, so shuffle the MD steps to reinforce the order.
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r--sys/dev/acpi/acpi_x86.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/acpi/acpi_x86.c b/sys/dev/acpi/acpi_x86.c
index c99c147792f..dd7d9a54bb1 100644
--- a/sys/dev/acpi/acpi_x86.c
+++ b/sys/dev/acpi/acpi_x86.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_x86.c,v 1.3 2022/02/14 23:42:37 kettenis Exp $ */
+/* $OpenBSD: acpi_x86.c,v 1.4 2022/02/15 02:29:23 deraadt Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -106,6 +106,12 @@ sleep_setstate(void *v)
if (aml_node_setval(sc, sc->sc_pts, sc->sc_state) != 0)
return (EINVAL);
acpi_indicator(sc, ACPI_SST_WAKING); /* blink */
+
+ acpibtn_enable_psw(); /* enable _LID for wakeup */
+ acpi_indicator(sc, ACPI_SST_SLEEPING);
+
+ /* 3rd suspend AML step: _GTS(tostate) */
+ aml_node_setval(sc, sc->sc_gts, sc->sc_state);
return 0;
}
@@ -114,12 +120,6 @@ gosleep(void *v)
{
struct acpi_softc *sc = v;
- acpibtn_enable_psw(); /* enable _LID for wakeup */
- acpi_indicator(sc, ACPI_SST_SLEEPING);
-
- /* 3rd suspend AML step: _GTS(tostate) */
- aml_node_setval(sc, sc->sc_gts, sc->sc_state);
-
/* Clear fixed event status */
acpi_write_pmreg(sc, ACPIREG_PM1_STS, 0, ACPI_PM1_ALL_STS);