From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [patch 2.6] don't put IDE disks in standby mode on halt on Alpha
Date: Sat, 29 May 2004 01:37:38 +0400 [thread overview]
Message-ID: <20040529013738.A629@den.park.msu.ru> (raw)
In-Reply-To: <200405281740.50798.bzolnier@elka.pw.edu.pl>; from B.Zolnierkiewicz@elka.pw.edu.pl on Fri, May 28, 2004 at 05:40:50PM +0200
On Fri, May 28, 2004 at 05:40:50PM +0200, Bartlomiej Zolnierkiewicz wrote:
> - AFAIR there are some buggy disks having flush cache
> bits that need standby anyway
Oh horror. I wouldn't be surprised if some drives don't flush
the cache even on standby...
> - you will hit 'halt problem' on alpha if your disk has
> write cache enabled and it doesn't have flush cache bits
>
> -EAGAIN ;)
Yep... :-(
Here's variant of the first patch with CONFIG_ALPHA and a Very Big Comment.
Ivan.
--- 2.6/drivers/ide/ide-disk.c Sat May 29 00:43:41 2004
+++ linux/drivers/ide/ide-disk.c Sat May 29 00:43:06 2004
@@ -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;
}
next prev parent reply other threads:[~2004-05-28 21:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-27 15:49 Ivan Kokshaysky
2004-05-27 16:26 ` Arjan van de Ven
2004-05-27 17:11 ` Ivan Kokshaysky
2004-05-27 17:12 ` Arjan van de Ven
2004-05-27 17:41 ` Miquel van Smoorenburg
2004-05-27 16:54 ` Bartlomiej Zolnierkiewicz
2004-05-27 17:08 ` Ivan Kokshaysky
2004-05-27 17:40 ` Bartlomiej Zolnierkiewicz
2004-05-28 15:10 ` Ivan Kokshaysky
2004-05-28 15:40 ` Bartlomiej Zolnierkiewicz
2004-05-28 21:37 ` Ivan Kokshaysky [this message]
2004-05-29 18:07 ` Bartlomiej Zolnierkiewicz
2004-05-28 10:34 ` Mark McClelland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040529013738.A629@den.park.msu.ru \
--to=ink@jurassic.park.msu.ru \
--cc=B.Zolnierkiewicz@elka.pw.edu.pl \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®