From: Alexey Starikovskiy Date: Mon, 12 Mar 2007 18:49:26 +0000 (-0400) Subject: ACPI: resolve HP nx6125 S3 immediate wakeup regression X-Git-Tag: v2.6.21-rc5~30^2~3^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d99967badac599c0d1db0b45c99e073e8e98cd4;p=linux-2.6 ACPI: resolve HP nx6125 S3 immediate wakeup regression Moving disable GPEs from enter_sleep up into sleep_prepare fixed the disabled SCI on S4 on Acer laptops. However, it caused an immediate S3 resume on the HP nx6125. Apparently, on the HP, a GPE was getting re-enabled after the prepare, but before the enter. Close that window by restoring the GPE disable on enter. This is redundant in most cases, but closes this window, where S3 and S4 paths differ. Signed-off-by: Alexey Starikovskiy Signed-off-by: Len Brown Acked-by: Ray Lee --- diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c index 8fa93125fd..c84b1faba2 100644 --- a/drivers/acpi/hardware/hwsleep.c +++ b/drivers/acpi/hardware/hwsleep.c @@ -300,6 +300,11 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) /* * 2) Enable all wakeup GPEs */ + status = acpi_hw_disable_all_gpes(); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + acpi_gbl_system_awake_and_running = FALSE; status = acpi_hw_enable_all_wakeup_gpes();