Subject: Re: kern/22869: Slave IDE drive not detected
To: Charles M. Hannum <abuse@spamalicious.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 09/22/2003 23:18:28
On Mon, Sep 22, 2003 at 08:36:57PM +0200, Manuel Bouyer wrote:
> [...]
> 
> It may be possible to speed up ghost detection via a command:
> - we may have a ghost only if we have the same signature for device 0 and
>   device 1 after a reset
> - if we may have a ghost, issue IDENTIFY or ATAPI_IDENTIFY as appropriate.
>   After that, we should have either BSY set, or DRQ set, or an aborted
>   command. If the status register remains all 0, then this isn't a real
>   device.

We still have a problem: for ATA drives, we need to wait for DRDY before
trying IDENDIFY, but the specs don't specify how long to wait here
(just 31s between reset and BSY cleared). As this is device dependant I
think we need to allow a few seconds.
But for a ghost DRDY will never be asserted.

Maybe we could use the hardware reset result word (word 93) from the identify
device result to speed up things, when available ? It's there since
ATA-5 at last (it's not in ATA-3 and I don't have ATA-4 to check here).


-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--