]> err.no Git - linux-2.6/commitdiff
ACPI: clear GPE earily in resume to avoid warning
authorShaohua Li <shaohua.li@intel.com>
Wed, 20 Jun 2007 01:17:58 +0000 (09:17 +0800)
committerLen Brown <len.brown@intel.com>
Fri, 1 Feb 2008 23:30:55 +0000 (18:30 -0500)
Wakeup GPE hasn't a handler. If system is waked up by such GPE like a
USB hotplug, I saw a lot of error reporting the GPE hasn't handler.
acpi_leave_sleep_state will clear the GPE but it's too late, we should
do it before interrupt is re-enabled.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/sleep/main.c

index cbfa058d89e33ea116105def51cc4682a24793f9..96d23b3cfc4e70c1d8cc81d0eeea5264af3114e9 100644 (file)
@@ -146,6 +146,13 @@ static int acpi_pm_enter(suspend_state_t pm_state)
        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");