Re: [PATCH] libata-core: Drop in the final bit of IORDY handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > + 	/* 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

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 ?

Alan


-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux