mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@osdl.org>
Cc: <len.brown@intel.com>, Pierre Ossman <drzeus-list@drzeus.cx>,
	acpi-devel@lists.sourceforge.net, ncunningham@cyclades.com,
	Pavel Machek <pavel@ucw.cz>, Masoud Sharbiani <masouds@masoud.ir>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] suspend: Cleanup calling of power off methods.
Date: Tue, 20 Sep 2005 11:49:24 -0600	[thread overview]
Message-ID: <m1zmq7fx3v.fsf_-_@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <m14q8fhc02.fsf_-_@ebiederm.dsl.xmission.com> (Eric W. Biederman's message of "Tue, 20 Sep 2005 11:42:21 -0600")


In the lead up to 2.6.13 I fixed a large number of reboot
problems by making the calling conventions consistent.  Despite
checking and double checking my work it appears I missed an
obvious one.

The S4 suspend code for PM_DISK_PLATFORM was also calling
device_shutdown without setting system_state, and was
not calling the appropriate reboot_notifier.

This patch fixes the bug by replacing the call of device_suspend with
kernel_poweroff_prepare.  

Various forms of this failure have been fixed and tracked for a while.

Thanks for tracking this down go to: Alexey Starikovskiy,
Meelis Roos <mroos@linux.ee>, Nigel Cunningham <ncunningham@cyclades.com>,
Pierre Ossman <drzeus-list@drzeus.cx>

History of this bug is at:
http://bugme.osdl.org/show_bug.cgi?id=4320

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>


---

 kernel/power/disk.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

2c72ba7b1126a7ccf3e8fc032f041a223e39aa97
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -17,12 +17,12 @@
 #include <linux/delay.h>
 #include <linux/fs.h>
 #include <linux/mount.h>
+#include <linux/pm.h>
 
 #include "power.h"
 
 
 extern suspend_disk_method_t pm_disk_mode;
-extern struct pm_ops * pm_ops;
 
 extern int swsusp_suspend(void);
 extern int swsusp_write(void);
@@ -49,13 +49,11 @@ dev_t swsusp_resume_device;
 
 static void power_down(suspend_disk_method_t mode)
 {
-	unsigned long flags;
 	int error = 0;
 
-	local_irq_save(flags);
 	switch(mode) {
 	case PM_DISK_PLATFORM:
- 		device_shutdown();
+		kernel_power_off_prepare();
 		error = pm_ops->enter(PM_SUSPEND_DISK);
 		break;
 	case PM_DISK_SHUTDOWN:

  reply	other threads:[~2005-09-20 17:51 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-01 18:23 reboot vs poweroff Brown, Len
2005-09-02  4:43 ` Eric W. Biederman
2005-09-10 21:07 ` Eric W. Biederman
2005-09-11  8:43   ` Meelis Roos
2005-09-11  8:53     ` Eric W. Biederman
2005-09-20 17:42     ` [PATCH 1/2] reboot: Comment and factor the main reboot functions Eric W. Biederman
2005-09-20 17:49       ` Eric W. Biederman [this message]
2005-09-20 21:06         ` [PATCH 2/2] suspend: Cleanup calling of power off methods Pavel Machek
2005-09-21  2:08           ` Eric W. Biederman
2005-09-21 10:18             ` Pavel Machek
2005-09-21 13:50               ` Eric W. Biederman
2005-09-21 16:35               ` Linus Torvalds
2005-09-21 17:28                 ` Eric W. Biederman
2005-09-21 18:02                   ` Andrew Morton
2005-09-21 17:36                 ` Alexander Nyberg
2005-09-21 18:15                   ` Andrew Morton
2005-09-21 19:45                     ` Hugh Dickins
2005-09-21 18:35                   ` Diego Calleja
2005-09-21 18:49                     ` Andrew Morton
2005-09-21 19:54                       ` Martin J. Bligh
2005-09-26 12:09                         ` Diego Calleja
2005-09-26 13:47                           ` Martin J. Bligh
2005-09-21 20:16                       ` Diego Calleja
2005-09-21 19:43                   ` Russell King
2005-09-21 20:10                     ` Andrew Morton
2005-09-22  7:15                     ` Pierre Ossman
2005-09-22  8:10                       ` [ACPI] " Rafael J. Wysocki
2005-09-22  9:30                       ` Eric W. Biederman
2005-09-22  9:38                         ` Russell King
2005-09-22 10:54                         ` Pierre Ossman
2005-09-21 17:46                 ` Andrew Morton
2005-09-21 18:08                   ` Eric W. Biederman
2005-09-21 18:24                     ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1zmq7fx3v.fsf_-_@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=acpi-devel@lists.sourceforge.net \
    --cc=drzeus-list@drzeus.cx \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masouds@masoud.ir \
    --cc=ncunningham@cyclades.com \
    --cc=pavel@ucw.cz \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®