This is a note to let you know that I've just added the patch titled

    ACPI : do not use Lid and Sleep button for S5 wakeup

to the 3.0-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     acpi-do-not-use-lid-and-sleep-button-for-s5-wakeup.patch
and it can be found in the queue-3.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From b7e383046c2c7c13ad928cd7407eafff758ddd4b Mon Sep 17 00:00:00 2001
From: Zhang Rui <rui.zh...@intel.com>
Date: Tue, 4 Dec 2012 23:23:16 +0100
Subject: ACPI : do not use Lid and Sleep button for S5 wakeup

From: Zhang Rui <rui.zh...@intel.com>

commit b7e383046c2c7c13ad928cd7407eafff758ddd4b upstream.

When system enters power off, the _PSW of Lid device is enabled.
But this may cause the system to reboot instead of power off.

A proper way to fix this is to always disable lid wakeup capability for S5.

References: https://bugzilla.kernel.org/show_bug.cgi?id=35262
Signed-off-by: Zhang Rui <rui.zh...@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com>
Cc: Joseph Salisbury <joseph.salisb...@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

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

--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -789,8 +789,8 @@ acpi_bus_extract_wakeup_device_power_pac
 static void acpi_bus_set_run_wake_flags(struct acpi_device *device)
 {
        struct acpi_device_id button_device_ids[] = {
-               {"PNP0C0D", 0},
                {"PNP0C0C", 0},
+               {"PNP0C0D", 0},
                {"PNP0C0E", 0},
                {"", 0},
        };
@@ -802,6 +802,11 @@ static void acpi_bus_set_run_wake_flags(
        /* Power button, Lid switch always enable wakeup */
        if (!acpi_match_device_ids(device, button_device_ids)) {
                device->wakeup.flags.run_wake = 1;
+               if (!acpi_match_device_ids(device, &button_device_ids[1])) {
+                       /* Do not use Lid/sleep button for S5 wakeup */
+                       if (device->wakeup.sleep_state == ACPI_STATE_S5)
+                               device->wakeup.sleep_state = ACPI_STATE_S4;
+               }
                device_set_wakeup_capable(&device->dev, true);
                return;
        }


Patches currently in stable-queue which might be from rui.zh...@intel.com are

queue-3.0/acpi-do-not-use-lid-and-sleep-button-for-s5-wakeup.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to