On Monday, 16 October 2006 20:55, Stefan Seyfried wrote:
> Hi,
>
> If nobody objects, i'd send this to LKML:
> Maybe somebody with a recent -mm kernel can test if it still applies there :-)
I have a very similar patch, but with two differences, that applies to -mm
and has been tested (on one box):
---
kernel/power/disk.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
Index: linux-2.6.19-rc1-mm1/kernel/power/disk.c
===================================================================
--- linux-2.6.19-rc1-mm1.orig/kernel/power/disk.c
+++ linux-2.6.19-rc1-mm1/kernel/power/disk.c
@@ -30,6 +30,22 @@ dev_t swsusp_resume_device;
sector_t swsusp_resume_block;
/**
+ * platform_prepare - prepare the machine for hibernation using the
+ * platform driver if so configured and return an error code if it fails
+ */
+
+static inline int platform_prepare(void)
+{
+ int error = 0;
+
+ if (pm_disk_mode == PM_DISK_PLATFORM) {
+ if (pm_ops && pm_ops->prepare)
+ error = pm_ops->prepare(PM_SUSPEND_DISK);
+ }
+ return error;
+}
+
+/**
* power_down - Shut machine down for hibernate.
* @mode: Suspend-to-disk mode
*
@@ -92,8 +108,14 @@ static int prepare_processes(void)
}
/* Free memory before shutting down devices. */
- if (!(error = swsusp_shrink_memory()))
+ error = swsusp_shrink_memory();
+ if (error)
+ goto thaw;
+
+ error = platform_prepare();
+ if (!error)
return 0;
+
thaw:
thaw_processes();
enable_cpus:
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Suspend-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/suspend-devel