diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/libata-core.c | 6 | ||||
-rw-r--r-- | drivers/ata/libata-eh.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index c325b7a4246a..05922e9f4fad 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -3267,9 +3267,11 @@ int sata_phy_debounce(struct ata_port *ap, const unsigned long *params, | |||
3267 | last = cur; | 3267 | last = cur; |
3268 | last_jiffies = jiffies; | 3268 | last_jiffies = jiffies; |
3269 | 3269 | ||
3270 | /* check deadline */ | 3270 | /* Check deadline. If debouncing failed, return |
3271 | * -EPIPE to tell upper layer to lower link speed. | ||
3272 | */ | ||
3271 | if (time_after(jiffies, deadline)) | 3273 | if (time_after(jiffies, deadline)) |
3272 | return -EBUSY; | 3274 | return -EPIPE; |
3273 | } | 3275 | } |
3274 | } | 3276 | } |
3275 | 3277 | ||
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 183eaf466d4f..1a4397ae9e48 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -1790,7 +1790,7 @@ static int ata_eh_reset(struct ata_port *ap, int classify, | |||
1790 | schedule_timeout_uninterruptible(delta); | 1790 | schedule_timeout_uninterruptible(delta); |
1791 | } | 1791 | } |
1792 | 1792 | ||
1793 | if (reset == hardreset && | 1793 | if (rc == -EPIPE || |
1794 | try == ARRAY_SIZE(ata_eh_reset_timeouts) - 1) | 1794 | try == ARRAY_SIZE(ata_eh_reset_timeouts) - 1) |
1795 | sata_down_spd_limit(ap); | 1795 | sata_down_spd_limit(ap); |
1796 | if (hardreset) | 1796 | if (hardreset) |