Commit:     8575b814097af648dad284bd3087875a11b13d18
Parent:     54936f8b099325992f0f212a5e366fd5257c6c9c
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Fri May 11 14:46:51 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri May 11 18:09:18 2007 -0400

    libata: give devices one last chance even if recovery failed with -EINVAL
    After certain errors, some devices report complete garbage on
    IDENTIFY.  This can cause ata_dev_read_id() to fail with -EINVAL
    resulting in immediate disabling of the device.  Give the device one
    last chance after -EINVAL to allow recovery from such situations.  As
    -EINVAL is triggered very rarely, this shouldn't cause any noticeable
    affect on more common error paths.
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Cc: Harald Dunkel <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
 drivers/ata/libata-eh.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index ee9bb53..5309c31 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2003,14 +2003,10 @@ static int ata_eh_recover(struct ata_port *ap, 
ata_prereset_fn_t prereset,
        switch (rc) {
-       case -EINVAL:
-               /* eeek, something went very wrong, give up */
-               ehc->tries[dev->devno] = 0;
-               break;
        case -ENODEV:
                /* device missing or wrong IDENTIFY data, schedule probing */
                ehc->i.probe_mask |= (1 << dev->devno);
+       case -EINVAL:
                /* give it just one more chance */
                ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1);
        case -EIO:
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to