From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Len Brown <lenb@kernel.org>
Cc: "ACPI Devel Mailing List" <linux-acpi@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
"Linux PM mailing list" <linux-pm@lists.linux-foundation.org>,
"Matthew Garrett" <mjg59@srcf.ucam.org>,
"Ferenc Wágner" <wferi@niif.hu>
Subject: [PATCH 1/2] ACPI / Wakeup: Enable button GPEs unconditionally during initialization
Date: Sun, 6 Feb 2011 14:20:17 +0100 [thread overview]
Message-ID: <201102061420.17431.rjw@sisk.pl> (raw)
In-Reply-To: <201102061418.56202.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
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.
References: https://bugzilla.kernel.org/show_bug.cgi?id=27372
Reported-and-tested-by: Ferenc Wágner <wferi@niif.hu>
Cc: stable@kernel.org
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
drivers/acpi/button.c | 13 -------------
drivers/acpi/wakeup.c | 6 +++++-
2 files changed, 5 insertions(+), 14 deletions(-)
Index: linux-2.6/drivers/acpi/wakeup.c
===================================================================
--- linux-2.6.orig/drivers/acpi/wakeup.c
+++ linux-2.6/drivers/acpi/wakeup.c
@@ -86,8 +86,12 @@ int __init acpi_wakeup_device_init(void)
struct acpi_device *dev = container_of(node,
struct acpi_device,
wakeup_list);
- if (device_can_wakeup(&dev->dev))
+ if (device_can_wakeup(&dev->dev)) {
+ /* Button GPEs are supposed to be always enabled. */
+ acpi_enable_gpe(dev->wakeup.gpe_device,
+ dev->wakeup.gpe_number);
device_set_wakeup_enable(&dev->dev, true);
+ }
}
mutex_unlock(&acpi_device_lock);
return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-02-06 13:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-06 13:18 [PATCH 0/2] ACPI / PM: Fix suspend regression related to button GPEs Rafael J. Wysocki
2011-02-06 13:20 ` Rafael J. Wysocki [this message]
2011-02-06 14:24 ` [Updated][PATCH 1/2] ACPI / Wakeup: Enable button GPEs unconditionally during initialization Rafael J. Wysocki
2011-02-06 13:21 ` [PATCH 2/2] ACPI / Button: Avoid disabling wakeup unnecessarily on remove Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201102061420.17431.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mjg59@srcf.ucam.org \
--cc=wferi@niif.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox