Skip to contentSkip to conversation

Fix swsusp-change-code-order-in-diskc.patch

PATCH In review Alexey Starikovskiy 2 participants 3 messages Jan 25, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix swsusp-change-code-order-in-diskc.patch

Hi,

Recent patch from Rafael changed the order of platform_prepare() and swsusp_read(). platform_prepare() should happen before swsusp_read() in order to get nice LED blinking during load of the image and time for GPE activity to settle down.

Attaching the patch to fix order.
Regards,
Alex.

Recent patch from Rafael changed the order of platform_prepare() and swsusp_read(). platform_prepare() should happen before swsusp_read() in order to get nice LED blinking during load of the image and time for GPE activity to settle down.

From: Alexey Starikovskiy <[email protected]>

LED blinking and time for GPE activity to stop.
---

 kernel/power/disk.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
kernel/power/disk.c +6 -5
index 33e67b4..406b20a 100644
@@ -240,21 +240,22 @@ static int software_resume(void)
 		goto Done;
 	}
 
-	pr_debug("PM: Reading swsusp image.\n");
-
-	error = swsusp_read();
+	error = platform_prepare();
 	if (error) {
 		swsusp_free();
 		goto Thaw;
 	}
 
-	pr_debug("PM: Preparing devices for restore.\n");
+	pr_debug("PM: Reading swsusp image.\n");
 
-	error = platform_prepare();
+	error = swsusp_read();
 	if (error) {
 		swsusp_free();
 		goto Thaw;
 	}
+
+	pr_debug("PM: Preparing devices for restore.\n");
+
 	suspend_console();
 	error = device_suspend(PMSG_PRETHAW);
 	if (error)
#1 lore raw

Hi!

Quoted 4 lines

Recent patch from Rafael changed the order of platform_prepare() and swsusp_read(). platform_prepare() should happen before swsusp_read() in order to get nice LED blinking during load of the image and time for GPE activity to settle down.

Well, looks acceptable to me.

But if GPEs need some time to settle down, that should be done explicitely, and with _big_ comment? What if your disk is too fast?

Also, same problem is likely present in uswsusp (and harder to fix there). Is this really required?
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw
Quoted 9 lines · Pavel Machek

Hi!

Quoted 5 lines

Recent patch from Rafael changed the order of platform_prepare() and swsusp_read(). platform_prepare() should happen before swsusp_read() in order to get nice LED blinking during load of the image and time for GPE activity to settle down.

Quoted 9 lines

Well, looks acceptable to me.

But if GPEs need some time to settle down, that should be done explicitely, and with _big_ comment? What if your disk is too fast?

Also, same problem is likely present in uswsusp (and harder to fix there). Is this really required?
Pavel

ACPI interrupt gets disabled if the GPE activity is not disabled before switching to loaded image
on some Acer machines. In most cases disabling them just before sw_switch() is enough, but it's better to
be on a safe side. And don't forget about blinking LED :)

Regards,
Alex.