From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alexey Starikovskiy <alexey_y_starikovskiy@linux.intel.com>
Cc: Pavel Machek <pavel@suse.cz>, "Brown, Len" <len.brown@intel.com>,
Linux ACPI <linux-acpi@vger.kernel.org>
Subject: Re: Runtime GPEs not saved over suspend/resume if type != "platform"
Date: Wed, 25 Oct 2006 20:54:31 +0200 [thread overview]
Message-ID: <200610252054.32945.rjw@sisk.pl> (raw)
In-Reply-To: <453F9252.9060404@linux.intel.com>
On Wednesday, 25 October 2006 18:35, Alexey Starikovskiy wrote:
> Here is a least intrusive patch by my opinion...
> Just copy pm_disk_mode from pm_ops supplied by platform.
> ACPI sets it to PM_DISK_PLATFORM if it has S4,
> and it should be zero otherwise, patch does not copy it then.
Well, I think the appended patch is sufficient.
If "platform" is unavailable it has no effect and works like "shutdown".
Greetings,
Rafael
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
kernel/power/disk.c | 8 +++++---
kernel/power/main.c | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
Index: linux-2.6.19-rc2-mm2/kernel/power/main.c
===================================================================
--- linux-2.6.19-rc2-mm2.orig/kernel/power/main.c
+++ linux-2.6.19-rc2-mm2/kernel/power/main.c
@@ -28,7 +28,7 @@
DECLARE_MUTEX(pm_sem);
struct pm_ops *pm_ops;
-suspend_disk_method_t pm_disk_mode = PM_DISK_SHUTDOWN;
+suspend_disk_method_t pm_disk_mode = PM_DISK_PLATFORM;
/**
* pm_set_ops - Set the global power method table.
Index: linux-2.6.19-rc2-mm2/kernel/power/disk.c
===================================================================
--- linux-2.6.19-rc2-mm2.orig/kernel/power/disk.c
+++ linux-2.6.19-rc2-mm2/kernel/power/disk.c
@@ -61,9 +61,11 @@ static void power_down(suspend_disk_meth
switch(mode) {
case PM_DISK_PLATFORM:
- kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
- error = pm_ops->enter(PM_SUSPEND_DISK);
- break;
+ if (pm_ops && pm_ops->enter) {
+ kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
+ error = pm_ops->enter(PM_SUSPEND_DISK);
+ break;
+ }
case PM_DISK_SHUTDOWN:
kernel_power_off();
break;
next prev parent reply other threads:[~2006-10-25 18:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-25 15:15 Runtime GPEs not saved over suspend/resume if type != "platform" Yu, Luming
2006-10-25 16:35 ` Alexey Starikovskiy
2006-10-25 18:54 ` Rafael J. Wysocki [this message]
2006-10-26 13:21 ` Alexey Starikovskiy
2006-10-26 15:01 ` Rafael J. Wysocki
2006-10-26 15:05 ` Alexey Starikovskiy
-- strict thread matches above, loose matches on Subject: below --
2006-10-25 15:18 Yu, Luming
2006-10-25 14:42 Alexey Starikovskiy
2006-10-25 15:07 ` Rafael J. Wysocki
2006-10-27 5:22 ` Len Brown
2006-10-27 8:40 ` Pavel Machek
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=200610252054.32945.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=alexey_y_starikovskiy@linux.intel.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=pavel@suse.cz \
/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