diff options
-rw-r--r-- | drivers/ata/libata-core.c | 6 | ||||
-rw-r--r-- | include/linux/ata.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 8a79b976f08a..02425e401a6d 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -2759,7 +2759,11 @@ static int ata_dev_set_mode(struct ata_device *dev) | |||
2759 | /* Old CFA may refuse this command, which is just fine */ | 2759 | /* Old CFA may refuse this command, which is just fine */ |
2760 | if (dev->xfer_shift == ATA_SHIFT_PIO && ata_id_is_cfa(dev->id)) | 2760 | if (dev->xfer_shift == ATA_SHIFT_PIO && ata_id_is_cfa(dev->id)) |
2761 | err_mask &= ~AC_ERR_DEV; | 2761 | err_mask &= ~AC_ERR_DEV; |
2762 | 2762 | /* Some very old devices and some bad newer ones fail any kind of | |
2763 | SET_XFERMODE request but support PIO0-2 timings and no IORDY */ | ||
2764 | if (dev->xfer_shift == ATA_SHIFT_PIO && !ata_id_has_iordy(dev->id) && | ||
2765 | dev->pio_mode <= XFER_PIO_2) | ||
2766 | err_mask &= ~AC_ERR_DEV; | ||
2763 | if (err_mask) { | 2767 | if (err_mask) { |
2764 | ata_dev_printk(dev, KERN_ERR, "failed to set xfermode " | 2768 | ata_dev_printk(dev, KERN_ERR, "failed to set xfermode " |
2765 | "(err_mask=0x%x)\n", err_mask); | 2769 | "(err_mask=0x%x)\n", err_mask); |
diff --git a/include/linux/ata.h b/include/linux/ata.h index c043c1ccf1c5..40c7af05fdb9 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -358,7 +358,7 @@ struct ata_taskfile { | |||
358 | #define ata_id_removeable(id) ((id)[0] & (1 << 7)) | 358 | #define ata_id_removeable(id) ((id)[0] & (1 << 7)) |
359 | #define ata_id_has_dword_io(id) ((id)[50] & (1 << 0)) | 359 | #define ata_id_has_dword_io(id) ((id)[50] & (1 << 0)) |
360 | #define ata_id_iordy_disable(id) ((id)[49] & (1 << 10)) | 360 | #define ata_id_iordy_disable(id) ((id)[49] & (1 << 10)) |
361 | #define ata_id_has_iordy(id) ((id)[49] & (1 << 9)) | 361 | #define ata_id_has_iordy(id) ((id)[49] & (1 << 11)) |
362 | #define ata_id_u32(id,n) \ | 362 | #define ata_id_u32(id,n) \ |
363 | (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) | 363 | (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) |
364 | #define ata_id_u64(id,n) \ | 364 | #define ata_id_u64(id,n) \ |