Remove suspend() calls from shutdown path
PATCH 1/1 Remove suspend() calls from shutdown path
Hi Andrew !
This patch remove the calls to device_suspend() from the shutdown path that were added sometime during 2.6.13-rc*. They aren't working properly on a number of configs (I got reports from both ppc powerbook users and x86 users) causing the system to not shutdown anymore.
I think it isn't the right approach at the moment anyway. We have already a shutdown() callback for the drivers that actually care about shutdown and the suspend() code isn't yet in a good enough shape to be so much generalized. Also, the semantics of suspend and shutdown are slightly different on a number of setups and the way this was patched in provides little way for drivers to cleanly differenciate. It should have been at least a different message.
For 2.6.13, I think we should revert to 2.6.12 behaviour and have a working suspend back.
kernel/sys.c +0 -2
@@ -404,7 +404,6 @@ {notifier_call_chain (&reboot_notifier_list,SYS_HALT ,NULL ); system_state =SYSTEM_HALT ; -device_suspend (PMSG_SUSPEND );device_shutdown ();printk (KERN_EMERG "System halted.\n" );machine_halt ();
@@ -415,7 +414,6 @@ {notifier_call_chain (&reboot_notifier_list,SYS_POWER_OFF ,NULL ); system_state =SYSTEM_POWER_OFF ; -device_suspend (PMSG_SUSPEND );device_shutdown ();printk (KERN_EMERG "Power down.\n" );machine_power_off ();
Hello Ben, Andrew,
This patch helps me if I disconnect all USB peripherals before shutting down notebook. With connected peripherals (USB mouse, PL2303 USB<->serial converter/port) - powering off process stops right after unmounting filesystems but before hda power off ...
There is a bug report for this too:
http://bugzilla.kernel.org/show_bug.cgi?id=4992
Z.
Quoted 47 lines · Benjamin Herrenschmidt
Hi Andrew !
This patch remove the calls to
device_suspend()from the shutdown path that were added sometime during 2.6.13-rc*. They aren't working properly on a number of configs (I got reports from both ppc powerbook users and x86 users) causing the system to not shutdown anymore.I think it isn't the right approach at the moment anyway. We have already a
shutdown()callback for the drivers that actually care about shutdown and thesuspend()code isn't yet in a good enough shape to be so much generalized. Also, the semantics of suspend and shutdown are slightly different on a number of setups and the way this was patched in provides little way for drivers to cleanly differenciate. It should have been at least a different message.For 2.6.13, I think we should revert to 2.6.12 behaviour and have a working suspend back.
Signed-off-by Benjamin Herrenschmidt <[email protected]>Index:
linux-work/kernel/sys.c
===================================================================kernel/sys.c +0
-3@@ -404,7 +404,6 @@ {notifier_call_chain (&reboot_notifier_list,SYS_HALT ,NULL ); system_state =SYSTEM_HALT ; -device_suspend (PMSG_SUSPEND );device_shutdown ();printk (KERN_EMERG "System halted.\n" );machine_halt ();@@ -415,7 +414,6 @@ {notifier_call_chain (&reboot_notifier_list,SYS_POWER_OFF ,NULL ); system_state =SYSTEM_POWER_OFF ; -device_suspend (PMSG_SUSPEND );device_shutdown ();printk (KERN_EMERG "Power down.\n" );machine_power_off (); -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 9 lines · Zilvinas Valinskas
Hello Ben, Andrew,
This patch helps me if I disconnect all USB peripherals before shutting down notebook. With connected peripherals (USB mouse, PL2303 USB<->serial converter/port) - powering off process stops right after unmounting filesystems but before hda power off ...
There is a bug report for this too:
http://bugzilla.kernel.org/show_bug.cgi?id=4992
This is unclear.
I would expect the behaviour you report to happen _without_ this patch, that is with current git tree, and I would expect this patch to fix it by reverting to the previous 2.6.12 behaviour...
Ben.
Quoted 11 lines · Benjamin Herrenschmidt
Quoted 9 lines · Zilvinas Valinskas
Hello Ben, Andrew,
This patch helps me if I disconnect all USB peripherals before shutting down notebook. With connected peripherals (USB mouse, PL2303 USB<->serial converter/port) - powering off process stops right after unmounting filesystems but before hda power off ...
There is a bug report for this too:
http://bugzilla.kernel.org/show_bug.cgi?id=4992
Quoted 7 lines
This is unclear.
I would expect the behaviour you report to happen _without_ this patch, that is with current git tree, and I would expect this patch to fix it by reverting to the previous 2.6.12 behaviour...
Ben.
Sys-rq - T: shows device_suspend() is called, perhaps that explains. It seems that any attempt to suspend either USB hub or device connected to it results in freeze. :\ Just guessing.
Anything else should I try ?
hcd_submit_urbwait_for_completiondefault_wake_functionusb_start_wait_urbtimeout_killusb_internal_control_msgusb_control_msghub_port_suspend__usb_suspend_device
locktreeusb_suspend_device__link_walk_pathdevice_suspend <----- still called ?ohci_rebootgeneric_ide_ioctlactivate_task__group_send_sig_infosys_killblock_ioctlblock_ioctldo_ioctlvfs_ioctlget_namesys_ioctlsys_enter_esp
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 7 lines · Zilvinas Valinskas
Hello Ben, Andrew,
This patch helps me if I disconnect all USB peripherals before shutting down notebook. With connected peripherals (USB mouse, PL2303 USB<->serial converter/port) - powering off process stops right after unmounting filesystems but before hda power off ...
Quoted 8 lines
Quoted 2 lines
There is a bug report for this too:
http://bugzilla.kernel.org/show_bug.cgi?id=4992This is unclear.
I would expect the behaviour you report to happen _without_ this patch, that is with current git tree, and I would expect this patch to fix it by reverting to the previous 2.6.12 behaviour...
I had this problem on a dual-core Athlon-based machine, but the patch apparently fixed it.
Rafael
Signature · 3 lines
- Would you tell me, please, which way I ought to go from here? - That depends a good deal on where you want to get to. -- Lewis Carroll "Alice's Adventures in Wonderland"
Quoted 13 lines · Rafael J. Wysocki
Quoted 11 lines · Benjamin Herrenschmidt
Quoted 9 lines · Zilvinas Valinskas
Hello Ben, Andrew,
This patch helps me if I disconnect all USB peripherals before shutting down notebook. With connected peripherals (USB mouse, PL2303 USB<->serial converter/port) - powering off process stops right after unmounting filesystems but before hda power off ...
There is a bug report for this too:
http://bugzilla.kernel.org/show_bug.cgi?id=4992
Quoted 9 lines
Quoted 5 lines
This is unclear.
I would expect the behaviour you report to happen _without_ this patch, that is with current git tree, and I would expect this patch to fix it by reverting to the previous 2.6.12 behaviour...
I had this problem on a dual-core Athlon-based machine, but the patch apparently fixed it.
So are all the (three?) bugs (regressions) which you were reporting now fixed?
Quoted 20 lines · you
Quoted 19 lines · Rafael J. Wysocki
Quoted 16 lines · Benjamin Herrenschmidt
Quoted 9 lines · Zilvinas Valinskas
Hello Ben, Andrew,
This patch helps me if I disconnect all USB peripherals before shutting down notebook. With connected peripherals (USB mouse, PL2303 USB<->serial converter/port) - powering off process stops right after unmounting filesystems but before hda power off ...
There is a bug report for this too:
http://bugzilla.kernel.org/show_bug.cgi?id=4992This is unclear.
I would expect the behaviour you report to happen _without_ this patch, that is with current git tree, and I would expect this patch to fix it by reverting to the previous 2.6.12 behaviour...
Quoted 6 lines
Quoted 3 lines
I had this problem on a dual-core Athlon-based machine, but the patch apparently fixed it.
So are all the (three?) bugs (regressions) which you were reporting now fixed?
Yes. As far as 2.6.13-rc5 (with the Ben's patch) is concerned, I have no visible problems whatever on any of my boxes.
Greets,
Rafael
Signature · 3 lines
- Would you tell me, please, which way I ought to go from here? - That depends a good deal on where you want to get to. -- Lewis Carroll "Alice's Adventures in Wonderland"