Commit 9185cfa9 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Len Brown

ACPI: S4: Use "platform" rather than "shutdown" mode by default

It has been reported that on some systems the functionality after a resume
from disk is limited if the system is simply powered off during the suspend
instead of using the ACPI S4 suspend (aka platform mode).

Unfortunately the default is currently to power off the system during the
suspend so the users of these systems experience problems after the resume
if they don't switch to the platform mode explicitly.  This patch makes swsusp
use the platform mode by default to avoid such situations.
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Acked-by: default avatarStefan Seyfried <seife@suse.de>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 8b0dc866
...@@ -44,9 +44,11 @@ static void power_down(suspend_disk_method_t mode) ...@@ -44,9 +44,11 @@ static void power_down(suspend_disk_method_t mode)
switch(mode) { switch(mode) {
case PM_DISK_PLATFORM: case PM_DISK_PLATFORM:
kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK); if (pm_ops && pm_ops->enter) {
error = pm_ops->enter(PM_SUSPEND_DISK); kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
break; error = pm_ops->enter(PM_SUSPEND_DISK);
break;
}
case PM_DISK_SHUTDOWN: case PM_DISK_SHUTDOWN:
kernel_power_off(); kernel_power_off();
break; break;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
DECLARE_MUTEX(pm_sem); DECLARE_MUTEX(pm_sem);
struct pm_ops *pm_ops; 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. * pm_set_ops - Set the global power method table.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment