[PATCH] ACPI:Disable all GPEs before re-enable interrupts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: ACPI: Disable all GPEs before re-enable interrupts.
From: Li Shaohua  <shaohua.li@xxxxxxxxx>

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 <shaohua.li@xxxxxxxxx>
Signed-off-by: Zhao Yakui <yakui.zhao@xxxxxxxxx>

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

Index: linux-2.6.23-rc3/drivers/acpi/sleep/main.c
===================================================================
--- linux-2.6.23-rc3.orig/drivers/acpi/sleep/main.c
+++ linux-2.6.23-rc3/drivers/acpi/sleep/main.c
@@ -122,6 +122,12 @@ 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux