Re: IDE-flash device and hard disk on same controller

From: Russell King (rmk@arm.linux.org.uk)
Date: Fri Aug 23 2002 - 06:03:50 EST


On Thu, Aug 22, 2002 at 09:26:04PM -0400, Jeff Garzik wrote:
> 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 ;-)

Assuming that you have firmware. What about the case of PCMCIA drives
that you plug in after the kernel has booted and get registered with
IDE almost immediately?

> 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.

Erm, no. Read the spec. When the drive is spinning up from power on,
BSY is set. BSY may be set for up to 30 seconds or so until the platters
are at full speed. (Some drives take even longer, maybe 40 seconds.)
Once this is so, there are magic bytes you can read from the drive
register that tell you if the device is AT or ATA. These aren't valid
until that BSY bit has cleared.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

- 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/



This archive was generated by hypermail 2b29 : Fri Aug 23 2002 - 22:00:27 EST