aboutsummaryrefslogtreecommitdiff
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 52c85af7fe9..7b61562cdd4 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1276,7 +1276,7 @@ static int ata_eh_speed_down(struct ata_device *dev, int is_io,
return ATA_EH_HARDRESET;
/* lower transfer mode */
- if (ata_down_xfermask_limit(dev, 0) == 0)
+ if (ata_down_xfermask_limit(dev, ATA_DNXFER_ANY) == 0)
return ATA_EH_SOFTRESET;
ata_dev_printk(dev, KERN_ERR,
@@ -1965,6 +1965,7 @@ static int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
struct ata_eh_context *ehc = &ap->eh_context;
struct ata_device *dev;
int down_xfermask, i, rc;
+ int dnxfer_sel;
DPRINTK("ENTER\n");
@@ -2064,8 +2065,10 @@ static int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
sata_down_spd_limit(ap);
default:
ehc->tries[dev->devno]--;
- if (down_xfermask &&
- ata_down_xfermask_limit(dev, ehc->tries[dev->devno] == 1))
+ dnxfer_sel = ATA_DNXFER_ANY;
+ if (ehc->tries[dev->devno] == 1)
+ dnxfer_sel = ATA_DNXFER_FORCE_PIO0;
+ if (down_xfermask && ata_down_xfermask_limit(dev, dnxfer_sel))
ehc->tries[dev->devno] = 0;
}