Commit 67166365 authored by Barry K. Nathan's avatar Barry K. Nathan Committed by Linus Torvalds

[PATCH] swsusp: properly suspend and resume all devices

During resume, my previous patch switches over to the saved swsusp image
without suspending all devices first.  This patch fixes that oversight, so
that the state of the hardware upon resume more closely matches the state
it had at suspend time.

While my previous patch alone seemed to work fine in my testing, it is
not fully correct without this as well.
Signed-off-by: default avatarBarry K. Nathan <barryn@pobox.com>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a20a26f3
...@@ -878,6 +878,7 @@ int swsusp_resume(void) ...@@ -878,6 +878,7 @@ int swsusp_resume(void)
{ {
int error; int error;
local_irq_disable(); local_irq_disable();
device_power_down(PM_SUSPEND_DISK);
/* We'll ignore saved state, but this gets preempt count (etc) right */ /* We'll ignore saved state, but this gets preempt count (etc) right */
save_processor_state(); save_processor_state();
error = swsusp_arch_resume(); error = swsusp_arch_resume();
...@@ -887,6 +888,7 @@ int swsusp_resume(void) ...@@ -887,6 +888,7 @@ int swsusp_resume(void)
BUG_ON(!error); BUG_ON(!error);
restore_processor_state(); restore_processor_state();
restore_highmem(); restore_highmem();
device_power_up();
local_irq_enable(); local_irq_enable();
return error; return error;
} }
......
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