diff options
Diffstat (limited to 'sys/contrib/dev/acpica/hwsleep.c')
-rw-r--r-- | sys/contrib/dev/acpica/hwsleep.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/sys/contrib/dev/acpica/hwsleep.c b/sys/contrib/dev/acpica/hwsleep.c index 1c0ba84..13224c7 100644 --- a/sys/contrib/dev/acpica/hwsleep.c +++ b/sys/contrib/dev/acpica/hwsleep.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface - * $Revision: 65 $ + * $Revision: 66 $ * *****************************************************************************/ @@ -374,7 +374,11 @@ AcpiEnterSleepState ( } } - Status = AcpiHwDisableNonWakeupGpes (); + /* + * 1) Disable all runtime GPEs + * 2) Enable all wakeup GPEs + */ + Status = AcpiHwPrepareGpesForSleep (); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); @@ -515,7 +519,11 @@ AcpiEnterSleepStateS4bios ( return_ACPI_STATUS (Status); } - Status = AcpiHwDisableNonWakeupGpes (); + /* + * 1) Disable all runtime GPEs + * 2) Enable all wakeup GPEs + */ + Status = AcpiHwPrepareGpesForSleep (); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); @@ -635,10 +643,14 @@ AcpiLeaveSleepState ( { ACPI_REPORT_ERROR (("Method _WAK failed, %s\n", AcpiFormatException (Status))); } + /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */ - /* _WAK returns stuff - do we want to look at it? */ - - Status = AcpiHwEnableNonWakeupGpes (); + /* + * Restore the GPEs: + * 1) Disable all wakeup GPEs + * 2) Enable all runtime GPEs + */ + Status = AcpiHwRestoreGpesOnWake (); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); |