* [PATCH] Remove suspend() calls from shutdown path
@ 2005-08-04 9:36 Benjamin Herrenschmidt
2005-08-04 12:16 ` Zilvinas Valinskas
0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2005-08-04 9:36 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linus Torvalds, Linux Kernel list
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.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-work/kernel/sys.c
===================================================================
--- linux-work.orig/kernel/sys.c 2005-08-01 14:03:46.000000000 +0200
+++ linux-work/kernel/sys.c 2005-08-04 11:32:51.000000000 +0200
@@ -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();
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] Remove suspend() calls from shutdown path
2005-08-04 9:36 [PATCH] Remove suspend() calls from shutdown path Benjamin Herrenschmidt
@ 2005-08-04 12:16 ` Zilvinas Valinskas
2005-08-04 15:20 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 7+ messages in thread
From: Zilvinas Valinskas @ 2005-08-04 12:16 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Andrew Morton, Linus Torvalds, Linux Kernel list
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.
On Thu, Aug 04, 2005 at 11:36:26AM +0200, Benjamin Herrenschmidt wrote:
> 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.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> Index: linux-work/kernel/sys.c
> ===================================================================
> --- linux-work.orig/kernel/sys.c 2005-08-01 14:03:46.000000000 +0200
> +++ linux-work/kernel/sys.c 2005-08-04 11:32:51.000000000 +0200
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] Remove suspend() calls from shutdown path
2005-08-04 12:16 ` Zilvinas Valinskas
@ 2005-08-04 15:20 ` Benjamin Herrenschmidt
2005-08-04 16:02 ` Zilvinas Valinskas
2005-08-04 20:51 ` Rafael J. Wysocki
0 siblings, 2 replies; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2005-08-04 15:20 UTC (permalink / raw)
To: Zilvinas Valinskas; +Cc: Andrew Morton, Linus Torvalds, Linux Kernel list
On Thu, 2005-08-04 at 15:16 +0300, Zilvinas Valinskas wrote:
> 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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Remove suspend() calls from shutdown path
2005-08-04 15:20 ` Benjamin Herrenschmidt
@ 2005-08-04 16:02 ` Zilvinas Valinskas
2005-08-04 20:51 ` Rafael J. Wysocki
1 sibling, 0 replies; 7+ messages in thread
From: Zilvinas Valinskas @ 2005-08-04 16:02 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Andrew Morton, Linus Torvalds, Linux Kernel list
On Thu, 2005-08-04 at 17:20 +0200, Benjamin Herrenschmidt wrote:
> On Thu, 2005-08-04 at 15:16 +0300, Zilvinas Valinskas wrote:
> > 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.
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_urb
wait_for_completion
default_wake_function
usb_start_wait_urb
timeout_kill
usb_internal_control_msg
usb_control_msg
hub_port_suspend
__usb_suspend_device
locktree
usb_suspend_device
__link_walk_path
device_suspend <----- still called ?
ohci_reboot
generic_ide_ioctl
activate_task
__group_send_sig_info
sys_kill
block_ioctl
block_ioctl
do_ioctl
vfs_ioctl
get_name
sys_ioctl
sys_enter_esp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Remove suspend() calls from shutdown path
2005-08-04 15:20 ` Benjamin Herrenschmidt
2005-08-04 16:02 ` Zilvinas Valinskas
@ 2005-08-04 20:51 ` Rafael J. Wysocki
2005-08-04 20:58 ` Andrew Morton
1 sibling, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2005-08-04 20:51 UTC (permalink / raw)
To: linux-kernel
Cc: Benjamin Herrenschmidt, Zilvinas Valinskas, Andrew Morton,
Linus Torvalds
On Thursday, 4 of August 2005 17:20, Benjamin Herrenschmidt wrote:
> On Thu, 2005-08-04 at 15:16 +0300, Zilvinas Valinskas wrote:
> > 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...
I had this problem on a dual-core Athlon-based machine, but the patch
apparently fixed it.
Rafael
--
- 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"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Remove suspend() calls from shutdown path
2005-08-04 20:51 ` Rafael J. Wysocki
@ 2005-08-04 20:58 ` Andrew Morton
2005-08-04 21:30 ` Rafael J. Wysocki
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2005-08-04 20:58 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-kernel, benh, zilvinas, torvalds
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:
>
> On Thursday, 4 of August 2005 17:20, Benjamin Herrenschmidt wrote:
> > On Thu, 2005-08-04 at 15:16 +0300, Zilvinas Valinskas wrote:
> > > 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...
>
> 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?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Remove suspend() calls from shutdown path
2005-08-04 20:58 ` Andrew Morton
@ 2005-08-04 21:30 ` Rafael J. Wysocki
0 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2005-08-04 21:30 UTC (permalink / raw)
To: linux-kernel; +Cc: benh, zilvinas, torvalds
On Thursday, 4 of August 2005 22:58, you wrote:
> "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> >
> > On Thursday, 4 of August 2005 17:20, Benjamin Herrenschmidt wrote:
> > > On Thu, 2005-08-04 at 15:16 +0300, Zilvinas Valinskas wrote:
> > > > 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...
> >
> > 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
--
- 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"
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-08-04 21:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-04 9:36 [PATCH] Remove suspend() calls from shutdown path Benjamin Herrenschmidt
2005-08-04 12:16 ` Zilvinas Valinskas
2005-08-04 15:20 ` Benjamin Herrenschmidt
2005-08-04 16:02 ` Zilvinas Valinskas
2005-08-04 20:51 ` Rafael J. Wysocki
2005-08-04 20:58 ` Andrew Morton
2005-08-04 21:30 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox