linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Possible bug and question about ide_notify_reboot in drivers/ide/ide.c (2.4.19)
@ 2002-09-13  2:37 Alex Davis
  2002-09-13 13:09 ` Alan Cox
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Alex Davis @ 2002-09-13  2:37 UTC (permalink / raw)
  To: linux-kernel

The ide_notify_reboot function contains the following code fragment:


		for (unit = 0; unit < MAX_DRIVES; ++unit) {
			drive = &hwif->drives[unit];
			if (!drive->present)
				continue;

			/* set the drive to standby */
			printk("%s ", drive->name);
			if (event != SYS_RESTART)
				if (drive->driver != NULL && DRIVER(drive)->standby(drive))
				continue;

			if (drive->driver != NULL && DRIVER(drive)->cleanup(drive))
				continue;
		}

The standby() function returns 0 on success, and non-zero on failure. If standby() returns
failure status, the cleanup() call is skipped. Is this intentional?

Second, why do we need to put the disks on standby before halting? I ask because putting
the disks on standby puts my hard drives into a coma!! When I power up after a halt, I have
to go into the BIOS and force auto-detect to wake them back up. I've removed the "standby"
code and things seem to be functioning normally. I have an Epox 8K7A motherboard with two
Maxtor Hard drives (model 5T040H4).


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: Possible bug and question about ide_notify_reboot in drivers/ide/ide.c (2.4.19)
@ 2002-09-14  1:01 Alex Davis
  2002-09-14  9:53 ` Matthias Andree
  0 siblings, 1 reply; 16+ messages in thread
From: Alex Davis @ 2002-09-14  1:01 UTC (permalink / raw)
  To: matthias.andree; +Cc: linux-kernel

>> Second, why do we need to put the disks on standby before halting? I ask because putting
>To make the broken ones flush their caches...

The cleanup() function in ide-disk.c will flush the write cache. Also, would
someone please point me to some documentation that states the cache is flushed
when the disk is put in standby: when I called Maxtor about this, they said that
the cache is NOT flushed. BTW, if your disk is so broken as to require being put
in standby mode to flush its write cache, then you are at great risk for data
corruption.

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2002-09-14 16:57 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-13  2:37 Possible bug and question about ide_notify_reboot in drivers/ide/ide.c (2.4.19) Alex Davis
2002-09-13 13:09 ` Alan Cox
2002-09-13 15:10   ` Tomas Szepe
2002-09-13 15:14     ` Alan Cox
2002-09-13 17:54       ` Tomas Szepe
2002-09-14  0:22         ` Matthias Andree
2002-09-13 15:19   ` Alex Davis
2002-09-13 16:15     ` Alan Cox
2002-09-13 17:39       ` Andre Hedrick
2002-09-14  1:08         ` Alex Davis
2002-09-14  0:21 ` Matthias Andree
2002-09-14 17:09 ` jbradford
2002-09-14  1:01 Alex Davis
2002-09-14  9:53 ` Matthias Andree
2002-09-14 13:37   ` Alan Cox
2002-09-14 13:42     ` Miquel van Smoorenburg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).