diff options
author | Thomas Renninger <trenn@suse.de> | 2007-08-24 01:24:47 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-08-24 01:24:47 -0400 |
commit | 79d2dfaa4e787f94b7f65f4611bc7d1c8d85fabc (patch) | |
tree | 99159e4136a05583defd654238d37fc63c91d7eb /drivers/acpi | |
parent | b377fd3982ad957c796758a90e2988401a884241 (diff) | |
download | kernel_goldelico_gta04-79d2dfaa4e787f94b7f65f4611bc7d1c8d85fabc.zip kernel_goldelico_gta04-79d2dfaa4e787f94b7f65f4611bc7d1c8d85fabc.tar.gz kernel_goldelico_gta04-79d2dfaa4e787f94b7f65f4611bc7d1c8d85fabc.tar.bz2 |
ACPI: enable GPEs before calling _WAK on resume
It seems it's required to enable GPEs before _WAK. E.g. X60 triggers a
LID related GPE instead of doing a Notify in WAK. Now the GPE reaches the
kernel and the Notify for LID status change gets thrown from there.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/hardware/hwsleep.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c index 76c525d..cf69c00 100644 --- a/drivers/acpi/hardware/hwsleep.c +++ b/drivers/acpi/hardware/hwsleep.c @@ -576,13 +576,10 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS")); } - status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL); - if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { - ACPI_EXCEPTION((AE_INFO, status, "During Method _WAK")); - } - /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */ - /* + * GPEs must be enabled before _WAK is called as GPEs + * might get fired there + * * Restore the GPEs: * 1) Disable/Clear all GPEs * 2) Enable all runtime GPEs @@ -591,13 +588,19 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } - acpi_gbl_system_awake_and_running = TRUE; - status = acpi_hw_enable_all_runtime_gpes(); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } + status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL); + if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { + ACPI_EXCEPTION((AE_INFO, status, "During Method _WAK")); + } + /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */ + + acpi_gbl_system_awake_and_running = TRUE; + /* Enable power button */ (void) |