aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-01-14 02:18:09 -0500
committerJeff Garzik <jgarzik@redhat.com>2010-01-20 14:25:11 -0500
commit534ead709235b967b659947c55d9130873a432c4 (patch)
tree8631f9b96e6e2d9e846012a62e165ce35e681290 /drivers/ata/libata-eh.c
parent24bc7347da73a9ed3383056c3d0f28c0e361621e (diff)
libata: retry FS IOs even if it has failed with AC_ERR_INVALID
libata currently doesn't retry if a command fails with AC_ERR_INVALID assuming that retrying won't get it any further even if retried. However, a failure may be classified as invalid through hardware glitch (incorrect reading of the error register or firmware bug) and there isn't whole lot to gain by not retrying as actually invalid commands will be failed immediately. Also, commands serving FS IOs are extremely unlikely to be invalid. Retry FS IOs even if it's marked invalid. Transient and incorrect invalid failure was seen while debugging firmware related issue on Samsung n130 on bko#14314. http://bugzilla.kernel.org/show_bug.cgi?id=14314 Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 0ea97c942ced..9f6cfac0f2cc 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2028,8 +2028,9 @@ static void ata_eh_link_autopsy(struct ata_link *link)
2028 qc->err_mask &= ~(AC_ERR_DEV | AC_ERR_OTHER); 2028 qc->err_mask &= ~(AC_ERR_DEV | AC_ERR_OTHER);
2029 2029
2030 /* determine whether the command is worth retrying */ 2030 /* determine whether the command is worth retrying */
2031 if (!(qc->err_mask & AC_ERR_INVALID) && 2031 if (qc->flags & ATA_QCFLAG_IO ||
2032 ((qc->flags & ATA_QCFLAG_IO) || qc->err_mask != AC_ERR_DEV)) 2032 (!(qc->err_mask & AC_ERR_INVALID) &&
2033 qc->err_mask != AC_ERR_DEV))
2033 qc->flags |= ATA_QCFLAG_RETRY; 2034 qc->flags |= ATA_QCFLAG_RETRY;
2034 2035
2035 /* accumulate error info */ 2036 /* accumulate error info */