]> err.no Git - linux-2.6/commitdiff
[SCSI] Fix sense key MEDIUM ERROR processing and retry
authorLuben Tuikov <ltuikov@yahoo.com>
Thu, 30 Nov 2006 03:45:23 +0000 (19:45 -0800)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Wed, 31 Jan 2007 18:18:52 +0000 (12:18 -0600)
1) If the device reports an uncorrectable MEDIUM ERROR, such
as SK MEDIUM ERROR, ASC UNRECOVERED READ ERR, AMNF DATA
FIELD or RECORD NOT FOUND, then: In scsi_check_sense()
return SUCCESS so as to not retry -- the error is
uncorrectable -- this speeds up total processing time.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Extracted the MEDIUM ERROR piece and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_error.c

index 8e5011d13a18f869b79e9fadfe39cb6a31b8cede..2dce06a58c08292ab42dc001b8f84aac4605d600 100644 (file)
@@ -359,6 +359,11 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
                return SUCCESS;
 
        case MEDIUM_ERROR:
+               if (sshdr.asc == 0x11 || /* UNRECOVERED READ ERR */
+                   sshdr.asc == 0x13 || /* AMNF DATA FIELD */
+                   sshdr.asc == 0x14) { /* RECORD NOT FOUND */
+                       return SUCCESS;
+               }
                return NEEDS_RETRY;
 
        case HARDWARE_ERROR: