Subject: Re: kern/22869: Slave IDE drive not detected
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Charles M. Hannum <abuse@spamalicious.com>
List: netbsd-bugs
Date: 09/22/2003 04:56:47
> I wouldn't call it generic, but I suspect it's happening with most pciide
> controllers. My theory is that these controllers have shadows registers of
> the drives registers, and don't always bother reading the real value.

That might be what you'd think if you only read the ATA-5 spec, and
not ATA-2 and earlier.  The reality is much dumber.

Traditionally, if the master does not detect a slave device (by
probing DIAGP during reset), it fakes the slave register access by
exposing its own register file -- so it smells a bit like there is
another device there -- but any attempt to actually execute a command
fails.

Why it's done this way, WTF knows?  It comes up every year or two on
the ATA mailing list, and nobody who's around any more seems to know
why.  It's a historical oddity.

At any rate, proper detection of drives without 15- or 30-second
stalls is very important, and it *will* be fixed.  It's not even
vaguely correct to say that detecting the ghosting "won't speed up the
probe" -- it has a huge and extremely obvious impact on many machines.