diff options
author | Tejun Heo <htejun@gmail.com> | 2007-07-16 01:29:40 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-20 08:19:06 -0400 |
commit | f1545154a5c96590b1992aac8ee1e2c445e301ed (patch) | |
tree | edd95f465369d8597c40e7fdcc9513dea5fd2712 /drivers/ata/libata-core.c | |
parent | 008a78961ec72990d09d7625ef9499d7317d040d (diff) |
libata: quickly trigger SATA SPD down after debouncing failed
Debouncing failure is a good indicator of basic link problem. Use
-EPIPE to indicate debouncing failure and make ata_eh_reset() invoke
sata_down_spd_limit() if the error occurs during reset.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 6 |
1 files changed, 4 insertions, 2 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 | ||