From: David Daney Date: Wed, 10 Dec 2008 23:39:12 +0000 (-0800) Subject: libata: Add special ata_pio_need_iordy() handling for Compact Flash. X-Git-Tag: v2.6.29-rc1~48^2~5 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5c18c4d28ba9a29203c1dc6b7c64df63ca00938a;p=linux-2.6-omap-h63xx.git libata: Add special ata_pio_need_iordy() handling for Compact Flash. According to the Compact Flash specification r4.1, PIO modes 5 and 6 do not use iordy. Signed-off-by: David Daney Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 9ae583554c8..175df54eb66 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -2001,6 +2001,10 @@ unsigned int ata_pio_need_iordy(const struct ata_device *adev) as the caller should know this */ if (adev->link->ap->flags & ATA_FLAG_NO_IORDY) return 0; + /* CF spec. r4.1 Table 22 says no iordy on PIO5 and PIO6. */ + if (ata_id_is_cfa(adev->id) + && (adev->pio_mode == XFER_PIO_5 || adev->pio_mode == XFER_PIO_6)) + return 0; /* PIO3 and higher it is mandatory */ if (adev->pio_mode > XFER_PIO_2) return 1;