Re: linux-2.6.6: ide-disks are shutdown on reboot

From: Rene Herman
Date: Tue May 11 2004 - 15:16:30 EST


Gerardo Exequiel Pozzi wrote:

With the recent version 2.6.6 my ide disks are shutdown on reboot, this not happens with 2.6.5. I try booting with acpi=off and it
behaves equal, disk shutdown on reboot.

Wildly annoying isn't it? Seems to be a generic problem with linux not differentiatinng between REBOOT and HALT/POWEROFF. Andrew Morton just posted a patch to deplex them:

http://marc.theaimsgroup.com/?l=linux-kernel&m=108425291909843&w=2

You can wait for the IDE crowd to use that to implement a proper fix or staple the attached hack on top if it must go now.

Rene.


--- linux-2.6.6.orig/drivers/ide/ide-disk.c 2004-05-11 12:40:53.000000000 +0200
+++ linux-2.6.6/drivers/ide/ide-disk.c 2004-05-11 12:09:30.000000000 +0200
@@ -1704,10 +1704,11 @@

static void ide_device_shutdown(struct device *dev)
{
- ide_drive_t *drive = container_of(dev, ide_drive_t, gendev);
-
- printk("Shutdown: %s\n", drive->name);
- dev->bus->suspend(dev, PM_SUSPEND_STANDBY);
+ if (system_state != SYSTEM_RESTART) {
+ ide_drive_t *drive = container_of(dev, ide_drive_t, gendev);
+ printk("Shutdown: %s\n", drive->name);
+ dev->bus->suspend(dev, PM_SUSPEND_STANDBY);
+ }
}

/*