[SCSI] Fix sense key MEDIUM ERROR processing and retry

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>
This commit is contained in:
Luben Tuikov 2006-11-29 19:45:23 -08:00 committed by James Bottomley
parent 7b3b921163
commit fd1b494d4a
1 changed files with 5 additions and 0 deletions

View File

@ -359,6 +359,11 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
return SUCCESS; return SUCCESS;
case MEDIUM_ERROR: 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; return NEEDS_RETRY;
case HARDWARE_ERROR: case HARDWARE_ERROR: