lkml.org 
[lkml]   [2002]   [Aug]   [23]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: IDE-flash device and hard disk on same controller
From(Eric W. Biederman)
Date23 Aug 2002 07:09:03 -0600
Jeff Garzik <jgarzik@mandrakesoft.com> writes:

> Eric W. Biederman wrote:
> > The problem is that immediately after bootup ATA devices do not respond until
> > their media has spun up.  Which is both required by the spec, and observed in
> > practice.   Which is likely a problem if this code is run a few seconds after
> > bootup.  Which makes it quite possible the drive will ignore the EXECUTE
> DEVICE
> 
> > DIAGNOSTICS and your error code won't be valid when the bsy flag
> > clears.   I don't know how serious that would be.
> 
> 
> Well, this only applies if you are slack and letting the kernel init your ATA
> from scratch, instead of doing proper ATA initialization in firmware ;-)

That would be nice.  I do admit it is hard to trigger if you don't do
it deliberately. 

The x86 BIOS specifications say only the boot devices must be
initialized, before the BIOS gives up control.  A more likely
reproducer is a plug-in ata controller that the BIOS does not
recognize, and the kernel does.

> Seriously, if you are a handed an ATA device that is actually in operation when
> the kernel boots, you are already out of spec.  I would prefer to barf if the
> BSY or DRDY bits are set, because taking over the ATA bus while a device is in
> the middle of a command shouldn't be happening at Linux kernel boot, ever.

Throwing an error and giving up would certainly be a safe response,
though it is a strange way to handle in spec hardware and firmware
behavior.  On the other hand it is a rare enough case deliberately not
coping with it is probably fine.

Eric
-
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 12:28    [from the cache]
©2003-2008