public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* Thinkpad suspend-to-disk regression
@ 2007-04-21 15:30 Guilherme Salgado
  0 siblings, 0 replies; 14+ messages in thread
From: Guilherme Salgado @ 2007-04-21 15:30 UTC (permalink / raw)
  To: linux-acpi

Hi there,

I recently noticed that my thinkpad T60 would lose the sound after
being suspended to disk (https://launchpad.net/bugs/80893), requiring
a cold restart to fix it. After some git-bisect work I found this
regression was a consequence of
http://git.kernel.org/?p=linux/kernel/git/lenb/linux-acpi-2.6.git;a=commitdiff;h=9185cfa92507d07ac787bc73d06c42222eec7239
(patch inlined here)

Is there any chance of fixing the regression this introduced without
reverting it? Please let me know if you want any other info or have a
patch for me to try.

Cheers,
Guilherme

diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index 0b00f56..88fc5d7 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -60,9 +60,11 @@ static void power_down(suspend_disk_method_t mode)
 {
 	switch(mode) {
 	case PM_DISK_PLATFORM:
-		kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
-		pm_ops->enter(PM_SUSPEND_DISK);
-		break;
+		if (pm_ops && pm_ops->enter) {
+			kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
+			pm_ops->enter(PM_SUSPEND_DISK);
+			break;
+		}
 	case PM_DISK_SHUTDOWN:
 		kernel_power_off();
 		break;
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 500eb87..ff3a618 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -29,7 +29,7 @@
 DEFINE_MUTEX(pm_mutex);

 struct pm_ops *pm_ops;
-suspend_disk_method_t pm_disk_mode = PM_DISK_SHUTDOWN;
+suspend_disk_method_t pm_disk_mode = PM_DISK_PLATFORM;

 /**
  *	pm_set_ops - Set the global power method table.

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-05-04 20:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <3d7cf86d0704241129i23da1b9fq93876573618e9dcd@mail.gmail.com>
     [not found] ` <200704250032.11108.rjw@sisk.pl>
2007-04-25  2:25   ` Thinkpad suspend-to-disk regression Guilherme Salgado
2007-04-25 12:47     ` Rafael J. Wysocki
2007-05-02 17:28       ` Guilherme Salgado
2007-05-02 19:37         ` Rafael J. Wysocki
2007-05-03 13:45           ` Guilherme Salgado
2007-05-03 17:23             ` Rafael J. Wysocki
2007-05-03 23:34               ` Guilherme Salgado
2007-05-04  9:07                 ` Rafael J. Wysocki
2007-05-04 12:37                   ` Guilherme Salgado
2007-05-04 13:33                     ` Joerg Platte
2007-05-04 13:39                       ` Guilherme Salgado
2007-05-04 16:08                         ` Guilherme Salgado
2007-05-04 20:55                           ` Rafael J. Wysocki
2007-04-21 15:30 Guilherme Salgado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox