[RFC] libata IORDY handling

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

 



Hello.

Sergei Shtylyov wrote:

Fix PIO mode 1 overclocked taskfile transfers -- probably a typo carried over
from drivers/ide/pci/siimage.c where I've found it by documentation check...

 drivers/ata/pata_sil680.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/ata/pata_sil680.c
===================================================================
--- linux-2.6.orig/drivers/ata/pata_sil680.c
+++ linux-2.6/drivers/ata/pata_sil680.c
@@ -135,7 +135,7 @@ static void sil680_error_handler(struct static void sil680_set_piomode(struct ata_port *ap, struct ata_device *adev)

It's sad to say but there's another bug in this function (even a regression from drivers/ide/pci/siimage.c) -- the 16-bit IORDY is not enabled when setting PIO mode (there's code that twiddles IORDY enable but that's actually only for *taskfile* accesses, 16-bit IORDY is controlled by the same PCI config. registers 80h/84h that enable DMA/UDMA transfer on SiI 680). I looked into fixing this but had a feeling that the thing wasn't right from the very start, including ata_pio_need_iordy(). In my understanding of the ANSI T13 stadrads, when one issues Set Features subcommand Set Transfer Mode with sector count register of 0x8 thru 0xC this means that IORDY *must* be enabled. That's what the ATA/ATAPI-6 says, for example:

        Table 45 - Transfer mode values
Mode                             Bits (7:3) Bits (2:0)
PIO default mode                 00000b     000b
PIO default mode, disable IORDY  00000b     001b
PIO *flow control* transfer mode 00001b     mode

   Comments?

MBR, Sergei
-
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