diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-02-16 20:20:37 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-02-16 20:20:37 +0000 |
commit | b78f936f01826d199b8c9bebee52b045a8979af8 (patch) | |
tree | c014b253d0dcf23e39cde89efb1e3e91d2504dd2 /sys/dev/acpi/acpi_x86.c | |
parent | 4e6fb964b831269075129eafe6cec12ff419da61 (diff) |
rev 1.4 was wrong to put potential IO operations after _GTS.
re-creating the original (2 weeks ago) order of last-minute-disk-parking
needs a different approach, hmm.
Diffstat (limited to 'sys/dev/acpi/acpi_x86.c')
-rw-r--r-- | sys/dev/acpi/acpi_x86.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/acpi/acpi_x86.c b/sys/dev/acpi/acpi_x86.c index b9a2980cbcf..5d9e41e9f27 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.9 2022/02/16 07:13:09 deraadt Exp $ */ +/* $OpenBSD: acpi_x86.c,v 1.10 2022/02/16 20:20:36 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -104,12 +104,6 @@ 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; } @@ -119,6 +113,12 @@ gosleep(void *v) struct acpi_softc *sc = v; int ret; + 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); |