Subject: Re: kern/22869: Slave IDE drive not detected
To: Charles M. Hannum <abuse@spamalicious.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 10/08/2003 11:44:59
On Tue, Oct 07, 2003 at 08:02:17PM +0000, Charles M. Hannum wrote:
> On Tuesday 23 September 2003 09:14 am, Manuel Bouyer wrote:
> > On Tue, Sep 23, 2003 at 12:51:52AM +0000, Charles M. Hannum wrote:
> > > > I added this to my tree (with my atabus changes), just after the return
> > > > from __wdcprobe() (in the current tree, this would be in wdcattach()),
> > > > which helps a lot. As with atabus kernel thread we do this in parallel
> > > > for all busses, we're down to 3s to detect the ghosts, independant from
> > > > the number of busses.
> > >
> > > But you can't do that.  You're assuming DRDY will be asserted within
> > > 3s of BSY being deasserted, but that is NOT what the spec says.
> >
> > I didn't see any timings specified in the specs, maybe I missed something.
> > 3s is what we do already, for ATA disks the IDENTIFY timeout is 3s (see
> > ata.c:ata_get_params()), and we try it after a reset in wdcattach()
> 
> That's for the IDENTIFY, though.  For the reset, you may have to wait up to 
> 31s (the timeout for PDIAG, mainly).  This *is* in the spec.

yes, of course. We're already waiting 31s for the reset to complete (that is,
for BSY to deassert). The delay we're talking about here is for between
BSY deaserts and DRDY asserts (for ATA drives only, ATAPI doesn't require
DRDY). The specs don't say anything about this, exept that it's
device-depedant. We have been using 3s for this ~forever.

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
     NetBSD: 24 ans d'experience feront toujours la difference
--