diff options
Diffstat (limited to 'sys/dev/acpica/acpi.c')
-rw-r--r-- | sys/dev/acpica/acpi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index b9de85d236ed..7a22f761f22d 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -2977,8 +2977,6 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) if (sleep_result == 1 && state != ACPI_STATE_S4) AcpiWriteBitRegister(ACPI_BITREG_SCI_ENABLE, ACPI_ENABLE_EVENT); - AcpiLeaveSleepStatePrep(state); - if (sleep_result == 1 && state == ACPI_STATE_S3) { /* * Prevent mis-interpretation of the wakeup by power button @@ -3007,6 +3005,8 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) /* call acpi_wakeup_machdep() again with interrupt enabled */ acpi_wakeup_machdep(sc, state, sleep_result, 1); + AcpiLeaveSleepStatePrep(state); + if (sleep_result == -1) goto backout; @@ -3015,8 +3015,8 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) AcpiEnable(); } else { status = AcpiEnterSleepState(state); - AcpiLeaveSleepStatePrep(state); intr_restore(intr); + AcpiLeaveSleepStatePrep(state); if (ACPI_FAILURE(status)) { device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n", AcpiFormatException(status)); |