lkml.org 
[lkml]   [2003]   [Nov]   [27]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: APM Suspend Problem
FromFelipe Alfaro Solana <>
DateThu, 27 Nov 2003 12:46:06 +0100
On Thu, 2003-11-27 at 07:20, Misha Nasledov wrote:
> Hi,> > Since about 2.6.0-test9, my ThinkPad T21 no longer suspends with APM. I had
> issues with it suspending before, I don't remember exactly what issues, but I
> know that it definitely worked in -test2. When I hit the key on my laptop to
> suspend, it will turn off the LCD and the HD will spin down, but the machine
> will not actually suspend. Here is what is printed out on the console when I
> hit the suspend key and then when I hit another key to "wake" it up:

Could you please try the attached patch? It allows my system to suspend
and resume using APM flawlessly.
--- 1.11/drivers/base/power/resume.c	Mon Aug 25 11:08:21 2003
+++ edited/drivers/base/power/resume.c	Fri Oct 10 21:06:07 2003
@@ -22,8 +22,17 @@
 
 int resume_device(struct device * dev)
 {
-	if (dev->bus && dev->bus->resume)
-		return dev->bus->resume(dev);
+	if (dev->bus && dev->bus->resume) {
+		int retval;
+
+		/* drop lock so the call can use device_del() to clean up
+		 * after unplugged (or otherwise vanished) child devices
+		 */
+		up(&dpm_sem);
+		retval = dev->bus->resume(dev);
+		down(&dpm_sem);
+		return retval;
+	}
 	return 0;
 }
 
\
 
 \ /
  Last update: 2005-03-22 13:58    [from the cache]
©2003-2008