diff options
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r-- | drivers/ata/libata-eh.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 52c85af7fe99..7b61562cdd40 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, | |||
1276 | return ATA_EH_HARDRESET; | 1276 | return ATA_EH_HARDRESET; |
1277 | 1277 | ||
1278 | /* lower transfer mode */ | 1278 | /* lower transfer mode */ |
1279 | if (ata_down_xfermask_limit(dev, 0) == 0) | 1279 | if (ata_down_xfermask_limit(dev, ATA_DNXFER_ANY) == 0) |
1280 | return ATA_EH_SOFTRESET; | 1280 | return ATA_EH_SOFTRESET; |
1281 | 1281 | ||
1282 | ata_dev_printk(dev, KERN_ERR, | 1282 | ata_dev_printk(dev, KERN_ERR, |
@@ -1965,6 +1965,7 @@ static int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
1965 | struct ata_eh_context *ehc = &ap->eh_context; | 1965 | struct ata_eh_context *ehc = &ap->eh_context; |
1966 | struct ata_device *dev; | 1966 | struct ata_device *dev; |
1967 | int down_xfermask, i, rc; | 1967 | int down_xfermask, i, rc; |
1968 | int dnxfer_sel; | ||
1968 | 1969 | ||
1969 | DPRINTK("ENTER\n"); | 1970 | DPRINTK("ENTER\n"); |
1970 | 1971 | ||
@@ -2064,8 +2065,10 @@ static int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
2064 | sata_down_spd_limit(ap); | 2065 | sata_down_spd_limit(ap); |
2065 | default: | 2066 | default: |
2066 | ehc->tries[dev->devno]--; | 2067 | ehc->tries[dev->devno]--; |
2067 | if (down_xfermask && | 2068 | dnxfer_sel = ATA_DNXFER_ANY; |
2068 | ata_down_xfermask_limit(dev, ehc->tries[dev->devno] == 1)) | 2069 | if (ehc->tries[dev->devno] == 1) |
2070 | dnxfer_sel = ATA_DNXFER_FORCE_PIO0; | ||
2071 | if (down_xfermask && ata_down_xfermask_limit(dev, dnxfer_sel)) | ||
2069 | ehc->tries[dev->devno] = 0; | 2072 | ehc->tries[dev->devno] = 0; |
2070 | } | 2073 | } |
2071 | 2074 | ||