Skip to content

Commit 11750a4

Browse files
Alan-CoxJeff Garzik
authored andcommitted
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
1 parent ce053fa commit 11750a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/ata/libata-core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2333,6 +2333,10 @@ static int ata_dev_set_mode(struct ata_device *dev)
23332333
dev->flags |= ATA_DFLAG_PIO;
23342334

23352335
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+
23362340
if (err_mask) {
23372341
ata_dev_printk(dev, KERN_ERR, "failed to set xfermode "
23382342
"(err_mask=0x%x)\n", err_mask);

0 commit comments

Comments
 (0)