From: deraadt Date: Tue, 15 Feb 2022 02:29:23 +0000 (+0000) Subject: The DVACT_POWERDOWN step was accidentally moved in relation to some MD X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e002b2557d79fea024731046ad121b12fd1a93bd;p=openbsd The DVACT_POWERDOWN step was accidentally moved in relation to some MD steps, so shuffle the MD steps to reinforce the order. --- 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 * Copyright (c) 2005 Jordan Hargrave @@ -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);