Subject: Re: kern/22869: Slave IDE drive not detected
To: David Laight <david@l8s.co.uk>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 09/22/2003 22:19:39
On Mon, Sep 22, 2003 at 09:21:02PM +0100, David Laight wrote:
> > > Hm, that might work.  The flowchart in the spec seems to indicate that
> > > DRQ should be asserted before BSY is cleared, but is that guaranteed?
> > 
> > I think so, all the specs I've seen indicates that BSY has to be cleared
> > last. Without this we could probably find senarios where a polled command
> > would not work as expected.
> 
> The only problem I remember is there may be a short delay after the command
> is written before BSY or DRQ is set (or DONE cleared).
> For a polled command without a data transfer it is difficult to tell
> whether the command has completed or nothing has happened.

The specs require to assert BSY within 400ns, so using DELAY(1) should
be safe.

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