patch-2.4.27 linux-2.4.27/drivers/ide/ide.c

Next file: linux-2.4.27/drivers/ide/pci/aec62xx.c
Previous file: linux-2.4.27/drivers/ide/ide-disk.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/drivers/ide/ide.c linux-2.4.27/drivers/ide/ide.c
@@ -2993,7 +2993,24 @@
 
 			/* set the drive to standby */
 			printk("%s ", drive->name);
+#ifdef	CONFIG_ALPHA
+			/* On Alpha, halt(8) doesn't actually turn the machine
+			   off, it puts you into the sort of firmware monitor.
+			   Typically, it's used to boot another kernel image,
+			   so it's not much different from reboot(8).
+			   Therefore, we don't need to spin down the disk in
+			   this case, especially since Alpha firmware doesn't
+			   handle disks in standby mode properly.
+			   On the other hand, it's reasonably safe to turn
+			   the power off when the shutdown process reaches
+			   the firmware prompt, as the firmware initialization
+			   takes rather long time - at least 10 seconds,
+			   which should be sufficient for the disk to expire
+			   its write cache. */
+			if (event == SYS_POWER_OFF)
+#else
 			if (event != SYS_RESTART)
+#endif
 				if (DRIVER(drive)->standby(drive))
 					continue;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)