[lkml]   [2011]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[31/70] ACPI / Wakeup: Enable button GPEs unconditionally during initialization
2.6.37-stable review patch.  If anyone has any objections, please let us know.


From: Rafael J. Wysocki <>

This is a backport of mainline kernel commit

Commit 9630bdd (ACPI: Use GPE reference counting to support shared
GPEs) introduced a suspend regression where boxes resume immediately
after being suspended due to the lid or sleep button wakeup status
not being cleared properly. This happens if the GPEs corresponding
to those devices are not enabled all the time, which apparently is
expected by some BIOSes.

To fix this problem, enable button and lid GPEs unconditionally
during initialization and keep them enabled all the time, regardless
of whether or not the ACPI button driver is used.

Reported-and-tested-by: Ferenc Wágner <>
Signed-off-by: Rafael J. Wysocki <>
Signed-off-by: Greg Kroah-Hartman <>

drivers/acpi/wakeup.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

--- a/drivers/acpi/wakeup.c
+++ b/drivers/acpi/wakeup.c
@@ -84,8 +84,12 @@ int __init acpi_wakeup_device_init(void)
struct acpi_device *dev = container_of(node,
struct acpi_device,
- if (dev->wakeup.flags.always_enabled)
+ if (dev->wakeup.flags.always_enabled) {
+ /* Button GPEs are supposed to be always enabled. */
+ acpi_enable_gpe(dev->wakeup.gpe_device,
+ dev->wakeup.gpe_number);
dev->wakeup.state.enabled = 1;
+ }
return 0;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2011-02-22 23:25    [W:0.209 / U:17.644 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site