[kernel] r15742 - in dists/trunk/linux-2.6/debian: . patches/bugfix/all patches/series

Maximilian Attems maks at alioth.debian.org
Tue May 18 14:08:38 UTC 2010


Author: maks
Date: Tue May 18 14:08:28 2010
New Revision: 15742

Log:
acpi: Fall back to manually changing SCI_EN.

fixes second suspend cycles on newer Thinkpads,
we need a backport of this in 2.6.32 too.

Added:
   dists/trunk/linux-2.6/debian/patches/bugfix/all/linux-2.6-acpi-sleep-live-sci-live.patch
Modified:
   dists/trunk/linux-2.6/debian/changelog
   dists/trunk/linux-2.6/debian/patches/series/base

Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog	Tue May 18 14:05:27 2010	(r15741)
+++ dists/trunk/linux-2.6/debian/changelog	Tue May 18 14:08:28 2010	(r15742)
@@ -19,6 +19,7 @@
   * [x86] Enable EEEPC_WMI.
   * Fix backlight support on some recent Thinkpads.
   * Enable autosuspend on UVC by default.
+  * acpi: Fall back to manually changing SCI_EN.
   
   [ Ben Hutchings ]
   * Prepare debconf templates for translation (Closes: #576758)

Added: dists/trunk/linux-2.6/debian/patches/bugfix/all/linux-2.6-acpi-sleep-live-sci-live.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/all/linux-2.6-acpi-sleep-live-sci-live.patch	Tue May 18 14:08:28 2010	(r15742)
@@ -0,0 +1,51 @@
+commit 7ba0dea4158155a68b833982199691dbc2d4e6dc
+Author: Matthew Garrett <mjg at redhat.com>
+Date:   Mon Apr 19 16:51:39 2010 -0400
+
+    acpi: Fall back to manually changing SCI_EN
+    
+    The ACPI spec tells us that the ACPI SCI_EN bit is under hardware control
+    and shouldn't be touched by the OS. It seems that the Leading Other OS
+    ignores this and some machines expect this behaviour. We have a blacklist
+    for these, but given that we're able to detect the failure case and the
+    alternative to breaking the spec is letting the machine crash and burn,
+    let's try falling back when we know the alternative is a mostly-dead
+    machine.
+    
+    Signed-off-by: Matthew Garrett <mjg at redhat.com>
+
+diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
+index f74834a..79df8d4 100644
+--- a/drivers/acpi/sleep.c
++++ b/drivers/acpi/sleep.c
+@@ -227,6 +227,7 @@ static int acpi_suspend_begin(suspend_state_t pm_state)
+ static int acpi_suspend_enter(suspend_state_t pm_state)
+ {
+ 	acpi_status status = AE_OK;
++	acpi_status enable_status = AE_OK;
+ 	unsigned long flags = 0;
+ 	u32 acpi_state = acpi_target_sleep_state;
+ 
+@@ -254,10 +255,19 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
+ 	}
+ 
+ 	/* If ACPI is not enabled by the BIOS, we need to enable it here. */
+-	if (set_sci_en_on_resume)
++	if (!set_sci_en_on_resume)
++		enable_status = acpi_enable();
++
++	if (set_sci_en_on_resume || enable_status == AE_NO_HARDWARE_RESPONSE)
++		/* If we're still in legacy mode then we have a problem. The
++		 * spec tells us that this bit is under hardware control, but
++		 * there's no plausible way that the OS can transition back to
++		 * legacy mode so our choices here are to either ignore the
++		 * spec or crash and burn horribly. The latter doesn't seem
++		 * like it's ever going to be the preferable choice, so let's
++		 * live dangerously.
++		 */
+ 		acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1);
+-	else
+-		acpi_enable();
+ 
+ 	/* Reprogram control registers and execute _BFS */
+ 	acpi_leave_sleep_state_prep(acpi_state);

Modified: dists/trunk/linux-2.6/debian/patches/series/base
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/base	Tue May 18 14:05:27 2010	(r15741)
+++ dists/trunk/linux-2.6/debian/patches/series/base	Tue May 18 14:08:28 2010	(r15742)
@@ -72,3 +72,4 @@
 + bugfix/x86/amd64-agp-Probe-unknown-AGP-devices-the-right-way.patch
 + bugfix/all/thinkpad-acpi-fix-backlight.patch
 + bugfix/all/linux-2.6-usb-uvc-autosuspend.diff
++ bugfix/all/linux-2.6-acpi-sleep-live-sci-live.patch



More information about the Kernel-svn-changes mailing list