lkml.org 
[lkml]   [2004]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] IDE update [1/10]
Date

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

From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>

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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.022 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site