* Re: [PATCH] properly stop devices before poweroff [not found] <200506260105.j5Q15eBj021334@hera.kernel.org> @ 2005-08-01 15:19 ` Olaf Hering 2005-08-01 16:10 ` [PATCH] remove device_suspend calls in sys_reboot path Olaf Hering 0 siblings, 1 reply; 4+ messages in thread From: Olaf Hering @ 2005-08-01 15:19 UTC (permalink / raw) To: Linux Kernel Mailing List On Sun, Jun 26, Linux Kernel Mailing List wrote: > tree e2de713c76ddb42b091305b88aa7ca4938081789 > parent 5ce47e59c9688d8480ae41100117d8188c191401 > author Pavel Machek <pavel@ucw.cz> Sun, 26 Jun 2005 04:55:11 -0700 > committer Linus Torvalds <torvalds@ppc970.osdl.org> Sun, 26 Jun 2005 06:24:33 -0700 > > [PATCH] properly stop devices before poweroff > > Without this patch, Linux provokes emergency disk shutdowns and > similar nastiness. It was in SuSE kernels for some time, IIRC. > > Signed-off-by: Pavel Machek <pavel@suse.cz> > Signed-off-by: Andrew Morton <akpm@osdl.org> > Signed-off-by: Linus Torvalds <torvalds@osdl.org> > > include/linux/pm.h | 33 +++++++++++++++++++++------------ > kernel/sys.c | 3 +++ > 2 files changed, 24 insertions(+), 12 deletions(-) > +++ b/kernel/sys.c > @@ -405,6 +405,7 @@ asmlinkage long sys_reboot(int magic1, i > case LINUX_REBOOT_CMD_HALT: > 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,6 +416,7 @@ asmlinkage long sys_reboot(int magic1, i > case LINUX_REBOOT_CMD_POWER_OFF: > 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(); This change for 'case LINUX_REBOOT_CMD_POWER_OFF' causes an endless hang after 'halt -p' on my Macs with USB keyboard. It went into rc1, but the hang in an usb device (1-1.3) shows up only with rc3. Why is device_suspend() called anyway if the system will go down anyway in a few milliseconds? ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] remove device_suspend calls in sys_reboot path 2005-08-01 15:19 ` [PATCH] properly stop devices before poweroff Olaf Hering @ 2005-08-01 16:10 ` Olaf Hering 2005-08-01 19:37 ` Olaf Hering 2005-08-02 9:58 ` Pavel Machek 0 siblings, 2 replies; 4+ messages in thread From: Olaf Hering @ 2005-08-01 16:10 UTC (permalink / raw) To: Linux Kernel Mailing List, Andrew Morton, Pavel Machek A recent change for 'case LINUX_REBOOT_CMD_POWER_OFF' causes an endless hang after 'halt -p' on my Macs with USB keyboard. It went into rc1, but the hang in an usb device (1-1.3) shows up only with rc3. Why is device_suspend() called anyway if the system will go down anyway in a few milliseconds? power down works again with this patch. Signed-off-by: Olaf Hering <olh@suse.de> kernel/sys.c | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: linux-2.6.13-rc4-git4/kernel/sys.c =================================================================== --- linux-2.6.13-rc4-git4.orig/kernel/sys.c +++ linux-2.6.13-rc4-git4/kernel/sys.c @@ -392,7 +392,6 @@ void kernel_kexec(void) } notifier_call_chain(&reboot_notifier_list, SYS_RESTART, NULL); system_state = SYSTEM_RESTART; - device_suspend(PMSG_FREEZE); device_shutdown(); printk(KERN_EMERG "Starting new kernel\n"); machine_shutdown(); @@ -405,7 +404,7 @@ void kernel_halt(void) { notifier_call_chain(&reboot_notifier_list, SYS_HALT, NULL); system_state = SYSTEM_HALT; - device_suspend(PMSG_SUSPEND); + device_suspend(PMSG_SUSPEND); /* FIXME */ device_shutdown(); printk(KERN_EMERG "System halted.\n"); machine_halt(); @@ -416,7 +415,6 @@ void kernel_power_off(void) { 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] 4+ messages in thread
* Re: [PATCH] remove device_suspend calls in sys_reboot path 2005-08-01 16:10 ` [PATCH] remove device_suspend calls in sys_reboot path Olaf Hering @ 2005-08-01 19:37 ` Olaf Hering 2005-08-02 9:58 ` Pavel Machek 1 sibling, 0 replies; 4+ messages in thread From: Olaf Hering @ 2005-08-01 19:37 UTC (permalink / raw) To: Linux Kernel Mailing List, Andrew Morton, Pavel Machek On Mon, Aug 01, Olaf Hering wrote: > > A recent change for 'case LINUX_REBOOT_CMD_POWER_OFF' causes an endless > hang after 'halt -p' on my Macs with USB keyboard. > It went into rc1, but the hang in an usb device (1-1.3) shows up only > with rc3. Why is device_suspend() called anyway if the > system will go down anyway in a few milliseconds? After reading last weeks sys_reboot thread, I'm not sure if this patch is correct. But halt -p should work again in 2.6.13, so we need something. Perhaps USB is broken now. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] remove device_suspend calls in sys_reboot path 2005-08-01 16:10 ` [PATCH] remove device_suspend calls in sys_reboot path Olaf Hering 2005-08-01 19:37 ` Olaf Hering @ 2005-08-02 9:58 ` Pavel Machek 1 sibling, 0 replies; 4+ messages in thread From: Pavel Machek @ 2005-08-02 9:58 UTC (permalink / raw) To: Olaf Hering; +Cc: Linux Kernel Mailing List, Andrew Morton Hi! > A recent change for 'case LINUX_REBOOT_CMD_POWER_OFF' causes an endless > hang after 'halt -p' on my Macs with USB keyboard. > It went into rc1, but the hang in an usb device (1-1.3) shows up only > with rc3. Why is device_suspend() called anyway if the > system will go down anyway in a few milliseconds? > > power down works again with this patch. You are shooting the messenger, and will cause emergency disk stops. Bad. Pavel -- teflon -- maybe it is a trademark, but it should not be. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-08-02 10:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200506260105.j5Q15eBj021334@hera.kernel.org>
2005-08-01 15:19 ` [PATCH] properly stop devices before poweroff Olaf Hering
2005-08-01 16:10 ` [PATCH] remove device_suspend calls in sys_reboot path Olaf Hering
2005-08-01 19:37 ` Olaf Hering
2005-08-02 9:58 ` Pavel Machek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox