lkml.org 
[lkml]   [2004]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectPATCH: Shutdown IDE before powering off.
Hi.

Here's a patch Bernard Blackham posted to the Software Suspend mailing
list, which has fixed data-not-being-properly flushed issues for some
people. (Forwarded with Bernard's permission).

Regards,

Nigel
--
My work on Software Suspend is graciously brought to you by
LinuxFund.org.
diff -ruN linux-2.6.0/drivers/ide/ide.c.orig linux-2.6.0/drivers/ide/ide.c
--- linux-2.6.0/drivers/ide/ide.c.orig 2003-12-18 10:58:38.000000000 +0800
+++ linux-2.6.0/drivers/ide/ide.c 2003-12-28 10:18:47.000000000 +0800
@@ -2493,6 +2493,11 @@
return 0;
}

+static void ide_drive_shutdown (struct device * dev)
+{
+ generic_ide_suspend(dev, 5);
+}
+
int ide_register_driver(ide_driver_t *driver)
{
struct list_head list;
@@ -2519,6 +2524,7 @@
driver->gen_driver.name = (char *) driver->name;
driver->gen_driver.bus = &ide_bus_type;
driver->gen_driver.remove = ide_drive_remove;
+ driver->gen_driver.shutdown = ide_drive_shutdown;
return driver_register(&driver->gen_driver);
}
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.614 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site