Skip to contentSkip to conversation

ACPI: suspend: Wrong order of GPE restore.

PATCH Rafael J. Wysocki 1 participant 1 message Oct 16, 2007 1 message not in the archive ACPI

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 6 lines · Alexey Starikovskiy

acpi_leave_sleep_state() should have correct list of wake and runtime GPEs, which is available only after disable_wakeup_device() is called.

---

Quoted 30 lines
 drivers/acpi/sleep/main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/sleep/main.c +2 -2
index 5055acf..728d595 100644
@@ -170,8 +170,8 @@ static int acpi_pm_finish(suspend_state_t pm_state)
 {
 	u32 acpi_state = acpi_target_sleep_state;
 
-	acpi_leave_sleep_state(acpi_state);
 	acpi_disable_wakeup_device(acpi_state);
+	acpi_leave_sleep_state(acpi_state);
 
 	/* reset firmware waking vector */
 	acpi_set_firmware_waking_vector((acpi_physical_address) 0);
@@ -256,8 +256,8 @@ static int acpi_hibernation_enter(void)
 
 static void acpi_hibernation_finish(void)
 {
-	acpi_leave_sleep_state(ACPI_STATE_S4);
 	acpi_disable_wakeup_device(ACPI_STATE_S4);
+	acpi_leave_sleep_state(ACPI_STATE_S4);
 
 	/* reset firmware waking vector */
 	acpi_set_firmware_waking_vector((acpi_physical_address) 0);
Signature · 1 line
"Premature optimization is the root of all evil." - Donald Knuth