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
> 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,
To make sure they have written back their caches, put themselves into
happy safe sleeping mode and are quiet.
> 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).
>
Congratulations your BIOS sucks 8)
> > 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).
>
> Congratulations your BIOS sucks 8)
Alan, obviously this should be made into a config option.
On Fri, 2002-09-13 at 16:10, Tomas Szepe wrote:
> > > 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).
> >
> > Congratulations your BIOS sucks 8)
>
> Alan, obviously this should be made into a config option.
I dont think so. We can't go around with 15,000 "My bios cant XYZ"
options and "My PCI bus ...".
--- Alan Cox <[email protected]> wrote:
> To make sure they have written back their caches...
This is redundant, since cleanup() flushes the write cache. Also, I spoke to a
Maxtor tech support person and he said that putting the drives in standby mode
does NOT flush the write cache. Yet another thing: you are flushing the cache,
by calling cleanup(), AFTER you put the disks to sleep. I think that's backward.
I guess the gist of my monlogue is: has anybody reported a problem that has been
solved by putting the disks to sleep??
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
On Fri, 2002-09-13 at 16:19, Alex Davis wrote:
>
> --- Alan Cox <[email protected]> wrote:
> > To make sure they have written back their caches...
>
> This is redundant, since cleanup() flushes the write cache. Also, I spoke to a
> Maxtor tech support person and he said that putting the drives in standby mode
> does NOT flush the write cache.
Whether we should be putting drives in Standby is an Andre question I
think. One dodgy bios isnt a good reason to change it
> Yet another thing: you are flushing the cache,
> by calling cleanup(), AFTER you put the disks to sleep. I think that's backward.
That would be a bug, but the 2.4.19 IDE code isnt my problem
Alan
So Alex,
What did you do prior to flush cache being added or did you care?
If you are talking about suspend, apm, acpi issues -- I am not interested
at the moment. It was not important to the folks at the top when I tried
to address the issue, and now I have my hands full with other things.
Sorry, but it will have to wait unless Marcelo wants it fixed and doing
half way solutions does not cut it. If it is wrong in -ac that is where
it shall be fixed first.
Cheers,
Andre Hedrick
LAD Storage Consulting Group
On 13 Sep 2002, Alan Cox wrote:
> On Fri, 2002-09-13 at 16:19, Alex Davis wrote:
> >
> > --- Alan Cox <[email protected]> wrote:
> > > To make sure they have written back their caches...
> >
> > This is redundant, since cleanup() flushes the write cache. Also, I spoke to a
> > Maxtor tech support person and he said that putting the drives in standby mode
> > does NOT flush the write cache.
>
> Whether we should be putting drives in Standby is an Andre question I
> think. One dodgy bios isnt a good reason to change it
>
>
> > Yet another thing: you are flushing the cache,
> > by calling cleanup(), AFTER you put the disks to sleep. I think that's backward.
>
> That would be a bug, but the 2.4.19 IDE code isnt my problem
>
> Alan
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
> > > > 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).
> > >
> > > Congratulations your BIOS sucks 8)
> >
> > Alan, obviously this should be made into a config option.
>
> I dont think so. We can't go around with 15,000 "My bios cant XYZ"
> options and "My PCI bus ...".
How about a kernel boot/module load option then?
Something like "ide0=ata66,noshutdown"
On Thu, 12 Sep 2002, Alex Davis wrote:
> 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 disks on standby puts my hard drives into a coma!! When I power up after a halt, I have
hard to believe. IDE drives spin up automatically from standby mode. If
not, they're broken. Plus, IDE drives will spin up from any state except
"defective" or "power loss" with a soft reset (and only broken drives
will lose their write cache over soft reset).
> 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).
My Maxtor 4W060H4 behaves well in standby.
Workaround: do a reboot :-)
--
Matthias Andree
On Fri, 13 Sep 2002, Tomas Szepe wrote:
> > I dont think so. We can't go around with 15,000 "My bios cant XYZ"
> > options and "My PCI bus ...".
>
> How about a kernel boot/module load option then?
> Something like "ide0=ata66,noshutdown"
So use reboot rather than halt. What's the issue here? Drives won't be
shut down on a reboot, and only use halt if you are to switch the power
off. (And if necessary, bug Epox about BIOS updates. Look as though the
board was not too old.)
--
Matthias Andree
>> 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
--- Andre Hedrick <[email protected]> wrote:
>
> So Alex,
>
> What did you do prior to flush cache being added or did you care?
Never had a problem.
> but it will have to wait unless Marcelo wants it fixed and doing
> half way solutions does not cut it. If it is wrong in -ac that is where
> it shall be fixed first.
>
I propose getting rid of the lines in ide_notify_disk that put the disk
in standby mode. The cache is already being flushed in the cleanup()
function. I can generate a patch against 2.4.19 ac4.
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
On Fri, 13 Sep 2002, Alex Davis wrote:
> 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
How about this: The FLUSH CACHE command has only recently become a
mandatory command for non-PACKET devices, so there may be drives that do
implement a write cache, but do NOT implement the FLUSH CACHE -- and
still adhere to some older edition of the ATA standard.
> 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.
See above. Disable Write Cache would also do with recent drives.
IBM specified for the DeskStar 40GV and 75GXP drives (DTLA, I use this
manual as I have that handy) that Soft Reset, Standby (Immediate) and
Flush Cache commands would only be executed after the completion of
writing to media (see the OEM manual, section 10.10 write cache
function, p.91 in my edition), and goes on "It is recommended that the
host system verify the completion of the write cache operation by
issuing Soft reset, the Standby (Immediate) command, or the Flush Cache
command to the device before power off."
I think I recall that some notebook drives would need the standby
immediate to flush the cache to work around firmware bugs with other
methods.
If I recall correctly, Windows' shutdown procedure was at some time in
the past changed to wait a couple of seconds before switching the ATX
computers off, to allow the drives to flush their caches. I can't quote
on a KB article though.
--
Matthias Andree
On Sat, 2002-09-14 at 10:53, Matthias Andree wrote:
> How about this: The FLUSH CACHE command has only recently become a
> mandatory command for non-PACKET devices, so there may be drives that do
> implement a write cache, but do NOT implement the FLUSH CACHE -- and
> still adhere to some older edition of the ATA standard.
Worse than that. There are drives that did implement it - as a no-op.
They didn't even say "Umm sorry no can do"
> See above. Disable Write Cache would also do with recent drives.
Except some drives have a habit of turning it back on quietly
> If I recall correctly, Windows' shutdown procedure was at some time in
> the past changed to wait a couple of seconds before switching the ATX
> computers off, to allow the drives to flush their caches. I can't quote
> on a KB article though.
Flush on shutdown was apparently one of the windows 98 service pack/hot
fix additions.
In article <[email protected]>,
Alan Cox <[email protected]> wrote:
>> How about this: The FLUSH CACHE command has only recently become a
>> mandatory command for non-PACKET devices, so there may be drives that do
>> implement a write cache, but do NOT implement the FLUSH CACHE -- and
>> still adhere to some older edition of the ATA standard.
>
>Worse than that. There are drives that did implement it - as a no-op.
>They didn't even say "Umm sorry no can do"
Putting the drive in stand-by mode has the side effect of flushing
the cache. So before poweroff, send the FLUSH CACHE command,
then send the standby command, hope that one of them works ..
I put put-the-drive-in-standby-mode stuff in halt.c of sysvinit
after several reports of fs corruption at poweroff and it seems
to have fixed the problems for the people who reported them.
Mike.
> Second, why do we need to put the disks on standby before halting?
So that data that is in their internal RAM cache is flushed before the power is switched off.
> 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.
That is very strange.
> I have an Epox 8K7A motherboard with two Maxtor Hard drives (model 5T040H4).
Never experienced that with a Maxtor hard disk. Best person to ask would be Alan.
John.