Subject: Re: kern/22869: Slave IDE drive not detected
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Charles M. Hannum <abuse@spamalicious.com>
List: tech-kern
Date: 09/22/2003 16:17:40
> We should get the contents of the drive 0 registers, not all 0.
>...
> Now, a command send to drive 1, when there's only one master, shoud not time
> out, it should be aborted immediatly by the drive. If it times out maybe
> we have a problem with the code sending the command.

I point you to section 9.16.1, "Device 0 only configurations", of the
ATA-4 spec.  It says (emphasis added):

"In a single device configuration where Device 0 is the only device
and the host selects Device 1, Device 0 shall respond as follows:
...
"3) A write to the Command register SHALL BE IGNORED, except for
EXECUTE DEVICE DIAGNOSTIC;
...
"5) A read of the Status or Alternate status register shall return the
value 00h."

So, we clearly cannot rely on the command being "aborted" -- that just
doesn't happen.

One thing to note is that, after a reset, if BSY is clear, we *should*
see that DRDY gets set.  Unfortunately, we might have to wait up to
30s to see *that* transition.

Note that, somehow, BIOSes manage this without waiting forever, so it
must be possible.