diff options
-rw-r--r-- | drivers/ata/libata-eh.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 8147a8386370..c15572d22a3b 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -2979,12 +2979,13 @@ static int ata_eh_handle_dev_fail(struct ata_device *dev, int err) | |||
2979 | /* give it just one more chance */ | 2979 | /* give it just one more chance */ |
2980 | ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1); | 2980 | ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1); |
2981 | case -EIO: | 2981 | case -EIO: |
2982 | if (ehc->tries[dev->devno] == 1 && dev->pio_mode > XFER_PIO_0) { | 2982 | if (ehc->tries[dev->devno] == 1) { |
2983 | /* This is the last chance, better to slow | 2983 | /* This is the last chance, better to slow |
2984 | * down than lose it. | 2984 | * down than lose it. |
2985 | */ | 2985 | */ |
2986 | sata_down_spd_limit(ata_dev_phys_link(dev)); | 2986 | sata_down_spd_limit(ata_dev_phys_link(dev)); |
2987 | ata_down_xfermask_limit(dev, ATA_DNXFER_PIO); | 2987 | if (dev->pio_mode > XFER_PIO_0) |
2988 | ata_down_xfermask_limit(dev, ATA_DNXFER_PIO); | ||
2988 | } | 2989 | } |
2989 | } | 2990 | } |
2990 | 2991 | ||