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/hardware/hwsleep.c | |
parent | b377fd3982ad957c796758a90e2988401a884241 (diff) |
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/hardware/hwsleep.c')
-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 76c525dc590b..cf69c0040a39 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) | |||
576 | ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS")); | 576 | ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS")); |
577 | } | 577 | } |
578 | 578 | ||
579 | status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL); | ||
580 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { | ||
581 | ACPI_EXCEPTION((AE_INFO, status, "During Method _WAK")); | ||
582 | } | ||
583 | /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */ | ||
584 | |||
585 | /* | 579 | /* |
580 | * GPEs must be enabled before _WAK is called as GPEs | ||
581 | * might get fired there | ||
582 | * | ||
586 | * Restore the GPEs: | 583 | * Restore the GPEs: |
587 | * 1) Disable/Clear all GPEs | 584 | * 1) Disable/Clear all GPEs |
588 | * 2) Enable all runtime GPEs | 585 | * 2) Enable all runtime GPEs |
@@ -591,13 +588,19 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) | |||
591 | if (ACPI_FAILURE(status)) { | 588 | if (ACPI_FAILURE(status)) { |
592 | return_ACPI_STATUS(status); | 589 | return_ACPI_STATUS(status); |
593 | } | 590 | } |
594 | acpi_gbl_system_awake_and_running = TRUE; | ||
595 | |||
596 | status = acpi_hw_enable_all_runtime_gpes(); | 591 | status = acpi_hw_enable_all_runtime_gpes(); |
597 | if (ACPI_FAILURE(status)) { | 592 | if (ACPI_FAILURE(status)) { |
598 | return_ACPI_STATUS(status); | 593 | return_ACPI_STATUS(status); |
599 | } | 594 | } |
600 | 595 | ||
596 | status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL); | ||
597 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { | ||
598 | ACPI_EXCEPTION((AE_INFO, status, "During Method _WAK")); | ||
599 | } | ||
600 | /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */ | ||
601 | |||
602 | acpi_gbl_system_awake_and_running = TRUE; | ||
603 | |||
601 | /* Enable power button */ | 604 | /* Enable power button */ |
602 | 605 | ||
603 | (void) | 606 | (void) |