libata-pmp-prep: implement EH fast-fail path
authorTejun Heo <htejun@gmail.com>
Sun, 23 Sep 2007 04:14:13 +0000 (13:14 +0900)
committerJeff Garzik <jeff@garzik.org>
Fri, 12 Oct 2007 18:55:41 +0000 (14:55 -0400)
If PMP itself becomes inaccessible while trying to link a downstream
link, spending time to recover the downstream link doesn't make any
sense.  Make EH skip retry and fail fast if -ERESTART is received.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-eh.c

index fbbf791639006fb9b9044f60bff679a0915a3120..3c31e10caf21e16bee5ee942fe5a1b5725c8bc38 100644 (file)
@@ -2050,7 +2050,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
        if (rc == -EAGAIN)
                rc = 0;
 
-       if (rc && try < ARRAY_SIZE(ata_eh_reset_timeouts)) {
+       if (rc && rc != -ERESTART && try < ARRAY_SIZE(ata_eh_reset_timeouts)) {
                unsigned long now = jiffies;
 
                if (time_before(now, deadline)) {