Skip to contentSkip to conversation

Test patch for sleep on Aluminium PowerBooks

DISCUSSION Benjamin Herrenschmidt 4 participants 5 messages Oct 27, 2004 – Nov 22, 2004 USB

lore
Share & tools
lore
#0 lore raw

Hi !

This is an experimental patch against 2.6.9. It concerns the ATI based Aluminium PowerBook. The nVidia based ones aren't concerned at all, and the iBook G4 will have to wait a bit more for me to get the video wakeup code right.

It will add sleep (suspend-to-ram) support for these machines.

It's based on various tested bits but is untested on these machines in it's current form, so let me know.

Ben.

#1 lore raw
Quoted 6 lines · Benjamin Herrenschmidt

Hi !

This is an experimental patch against 2.6.9. It concerns the ATI based Aluminium PowerBook. The nVidia based ones aren't concerned at all, and the iBook G4 will have to wait a bit more for me to get the video wakeup code right.

Works for me, thanks. Works better if I have the attached patch too.

Xorg doesn't seem to receive mouse events from the USB mouse after resume, but 'od -t x1 /dev/input/mice' does continue to work after resume. I'll investigate that one further.

Signature · 1 line
dwmw2
drivers/usb/core/hub.c renamed from drivers/usb/core/hub.c.susp +3 -3
@@ -1527,12 +1527,12 @@ static int __usb_suspend_device (struct 
 			 * even for drivers that can't suspend.
 			 */
 			if (!driver->suspend || state > PM_SUSPEND_MEM) {
-#if 1
+#if 0
 				dev_warn(&intf->dev, "resume is unsafe!\n");
 #else
-				down_write(&usb_bus_type.rwsem);
+				down_write(&usb_bus_type.subsys.rwsem);
 				device_release_driver(&intf->dev);
-				up_write(&usb_bus_type.rwsem);
+				up_write(&usb_bus_type.subsys.rwsem);
 #endif
 			}
 		}
#2 lore raw
In reply to Benjamin Herrenschmidt
Quoted 6 lines · On 2004-10-27 05:50:36 -0400 Benjamin Herrenschmidt <[email protected]>…

This is an experimental patch against 2.6.9. It concerns the ATI based Aluminium PowerBook. The nVidia based ones aren't concerned at all, and
the iBook G4 will have to wait a bit more for me to get the video wakeup
code right.

Hello all; a little late in responding to this, but I wanted to ask some questions concerning possible issues I've been having. I'm running on an AluBook 1.5Ghz, Linux kernel 2.6.9. I suppose this is mainly addressed to Ben H.

Does this patch do, or should have to do, anything special to "normalize" the mounted filesystems before sleep? When I patched the kernel first, I was running XFS, and of course that is notorious for file corruptions with power abnormalities on a system. I started to get really odd file corruptions, where 'ls file' would should the file, but 'ls -l file' would not.

I switched to ReiserFS (v3) now, and have seen symptoms like this problem caused appear once more (but not to the extent that XFS showed [where I thought my system was disintegrating before my eyes]).

Is there something that was overlooked in the patch, or something that I'm overlooking that needs to be done?

If filesystems do not need to be "normalized" at sleep, what filesystems are known to work? (Hesistant about ext3, as it's quite slow, imho, but I'll go that route if needed, I suppose).

Thanks!

__Armando Di Cianno

RFC3156 defines security multipart formats for MIME with OpenPGP.

#3 lore raw
Quoted 7 lines

Does this patch do, or should have to do, anything special to "normalize" the mounted filesystems before sleep? When I patched the kernel first, I was running XFS, and of course that is notorious for file corruptions with power abnormalities on a system. I started to get really odd file corruptions, where 'ls file' would should the file, but 'ls -l file' would not.

I though xfs was supposed to be journaled ? Yes, the sleep code will sync all disks before sleep. You should update to patch #4 though, there have been number of problems fixes since then.

Quoted 3 lines

I switched to ReiserFS (v3) now, and have seen symptoms like this problem caused appear once more (but not to the extent that XFS showed [where I thought my system was disintegrating before my eyes]).

Hrm... reiserfs is evil, ask any sane kernel hacker :) Why not ext3 ?

Quoted 6 lines

Is there something that was overlooked in the patch, or something that I'm overlooking that needs to be done?

If filesystems do not need to be "normalized" at sleep, what filesystems are known to work? (Hesistant about ext3, as it's quite slow, imho, but I'll go that route if needed, I suppose).

It's not that slow ...

Ben.

#4 lore raw

On 23 Nov 2004 at 09h11, Benjamin Herrenschmidt wrote:

Hi,

Quoted 5 lines
Quoted 3 lines

If filesystems do not need to be "normalized" at sleep, what filesystems are known to work? (Hesistant about ext3, as it's quite slow, imho, but I'll go that route if needed, I suppose).

It's not that slow ...

It also has the advantages of being natively big-endian, giving us ppc users a bit more speed :)

Signature · 4 lines
 \|/ ____ \|/   Colin
 "@'/ ,. \`@"   http://www.geekounet.org/
 /_| \__/ |_\
    \__U_/