summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-07-16 14:29:40 +0900
committerJeff Garzik <jeff@garzik.org>2007-07-20 08:19:06 -0400
commitf1545154a5c96590b1992aac8ee1e2c445e301ed (patch)
treeedd95f465369d8597c40e7fdcc9513dea5fd2712 /drivers/ata/libata-eh.c
parent008a78961ec72990d09d7625ef9499d7317d040d (diff)
downloadblackbird-op-linux-f1545154a5c96590b1992aac8ee1e2c445e301ed.tar.gz
blackbird-op-linux-f1545154a5c96590b1992aac8ee1e2c445e301ed.zip
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-eh.c')
-rw-r--r--drivers/ata/libata-eh.c2
1 files changed, 1 insertions, 1 deletions
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,
schedule_timeout_uninterruptible(delta);
}
- if (reset == hardreset &&
+ if (rc == -EPIPE ||
try == ARRAY_SIZE(ata_eh_reset_timeouts) - 1)
sata_down_spd_limit(ap);
if (hardreset)
OpenPOWER on IntegriCloud