aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLuben Tuikov <ltuikov@yahoo.com>2006-11-29 22:45:23 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-01-31 13:18:52 -0500
commitfd1b494d4a8147da4517fef72d15116bbb1a2dc7 (patch)
tree73f28f312550a90b062efc63635d0f76afbd33e5 /drivers
parent7b3b92116387fbea7b3b42553180984a544206d9 (diff)
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/scsi_error.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 8e5011d13a1..2dce06a58c0 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -359,6 +359,11 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
359 return SUCCESS; 359 return SUCCESS;
360 360
361 case MEDIUM_ERROR: 361 case MEDIUM_ERROR:
362 if (sshdr.asc == 0x11 || /* UNRECOVERED READ ERR */
363 sshdr.asc == 0x13 || /* AMNF DATA FIELD */
364 sshdr.asc == 0x14) { /* RECORD NOT FOUND */
365 return SUCCESS;
366 }
362 return NEEDS_RETRY; 367 return NEEDS_RETRY;
363 368
364 case HARDWARE_ERROR: 369 case HARDWARE_ERROR: