diff options
author | Alan <alan@lxorguk.ukuu.org.uk> | 2007-02-05 11:28:30 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-09 17:39:40 -0500 |
commit | 11750a40abddff1e0c6e0924902f914292d12277 (patch) | |
tree | ca8723dd1ebec5d005096721033c210a1b86714b /drivers | |
parent | ce053fa8b532aa038fba6230052daae5cd60eae6 (diff) |
libata: Early CFA adapters are not required to support mode setting
If we are doing a PIO setup for a CFA card and it blows up with a device
error then assume it is an older CFA card which doesn't support this
rather than failing the device out of existance.
Stands seperate to the quieting patch but that is obviously useful with
this change.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/libata-core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 6a2083a6d175..479f95a5c0a3 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -2333,6 +2333,10 @@ static int ata_dev_set_mode(struct ata_device *dev) | |||
2333 | dev->flags |= ATA_DFLAG_PIO; | 2333 | dev->flags |= ATA_DFLAG_PIO; |
2334 | 2334 | ||
2335 | err_mask = ata_dev_set_xfermode(dev); | 2335 | err_mask = ata_dev_set_xfermode(dev); |
2336 | /* Old CFA may refuse this command, which is just fine */ | ||
2337 | if (dev->xfer_shift == ATA_SHIFT_PIO && ata_id_is_cfa(dev->id)) | ||
2338 | err_mask &= ~AC_ERR_DEV; | ||
2339 | |||
2336 | if (err_mask) { | 2340 | if (err_mask) { |
2337 | ata_dev_printk(dev, KERN_ERR, "failed to set xfermode " | 2341 | ata_dev_printk(dev, KERN_ERR, "failed to set xfermode " |
2338 | "(err_mask=0x%x)\n", err_mask); | 2342 | "(err_mask=0x%x)\n", err_mask); |