[PATCH] IDE update [1/10]

From: Bartlomiej Zolnierkiewicz
Date: Tue Jun 01 2004 - 17:45:03 EST



[PATCH] ide: don't put disks in standby mode on halt on Alpha

From: Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxxxxxxx>

linux-2.6.7-rc2-bk2-bzolnier/drivers/ide/ide-disk.c | 15 +++++++++++++++
1 files changed, 15 insertions(+)

diff -puN drivers/ide/ide-disk.c~ide_alpha_halt_fix drivers/ide/ide-disk.c
--- linux-2.6.7-rc2-bk2/drivers/ide/ide-disk.c~ide_alpha_halt_fix 2004-06-01 19:02:13.749812168 +0200
+++ linux-2.6.7-rc2-bk2-bzolnier/drivers/ide/ide-disk.c 2004-06-01 19:02:13.753811560 +0200
@@ -1713,7 +1713,22 @@ static void ide_device_shutdown(struct d
{
ide_drive_t *drive = container_of(dev, ide_drive_t, gendev);

+#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 (system_state != SYSTEM_POWER_OFF) {
+#else
if (system_state == SYSTEM_RESTART) {
+#endif
ide_cacheflush_p(drive);
return;
}

_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/