Alan Cox wrote:

+       /* Ancient devices may need us to avoid IORDY */
+       if (ata_pio_need_iordy(dev))
+               tf.nsect = dev->xfer_mode;
+       else
+               tf.nsect = 0x01;

This is wrong logic as I've alredy pointed out: according to the ATA-2 setting *any* PIO mode via 0x08..0x0c commands assumes IORDY is enabled. We should only set mode 0x01 (default w/IORDY disabled) if device supports IORDY and the host doesn't.

ata_pio_need_iordy is false if

- the controller does not support iordy

   Hm, I'm sorry -- it turned out that I was looking at 2.6.21...

or

- mode <= PIO 2 and the device does not support iordy

I can tighten that if to

        if (!ata_pio_need_iordy(dev) && ata_has_iordy(dev->id))
                tf.nsect = 0x01;
if you prefer ?

   Yeah, that'd be better. :-)

Alan

MBR, Sergei
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to