Subject: ACPI: Disable all GPEs before re-enable interrupts.
From: Zhao Yakui  <[EMAIL PROTECTED]>

Some wakeup gpes have no handler. If system is waked up by such GPE like
a USB hotplug, sometimes it will cause a lot of errors reporting that
the GPE has no handler .
Of course acpi_leave_sleep_state will disable and clear the GPE but it's
too late. It should be done before interrupt is re-enabled.

Signed-off-by: Li Shaohua <[EMAIL PROTECTED]>
Signed-off-by: Zhao Yakui <[EMAIL PROTECTED]>

---
 drivers/acpi/sleep/main.c |    7 +++++++
 1 file changed, 7 insertions(+)

Index: linux-2.6.24-rc2/drivers/acpi/sleep/main.c
===================================================================
--- linux-2.6.24-rc2.orig/drivers/acpi/sleep/main.c
+++ linux-2.6.24-rc2/drivers/acpi/sleep/main.c
@@ -146,6 +146,13 @@ static int acpi_pm_enter(suspend_state_t
        if (ACPI_SUCCESS(status) && (acpi_state == ACPI_STATE_S3))
                acpi_clear_event(ACPI_EVENT_POWER_BUTTON);
 
+       /*
+        * Disable and clear GPE status before interrupt is enabled.Some GPEs
+        * (like wakeup GPE) haven't handler, this can avoid such GPE misfire.
+        * acpi_leave_sleep_state will reenable specific GPEs later.
+        */
+       acpi_hw_disable_all_gpes();
+
        local_irq_restore(flags);
        printk(KERN_DEBUG "Back to C!\n");
 
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to