summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2013-04-11 06:34:41 +0000
committermav <mav@FreeBSD.org>2013-04-11 06:34:41 +0000
commit4a4cddb38e7fbb7ca0a5a22b0698eb9d91d9775f (patch)
tree702325ceed8053f7e9a5ac20dfb65fcf43d67611
parentea145a8678878b2fe9970cf8eb1b49a3fd807dec (diff)
downloadFreeBSD-src-4a4cddb38e7fbb7ca0a5a22b0698eb9d91d9775f.zip
FreeBSD-src-4a4cddb38e7fbb7ca0a5a22b0698eb9d91d9775f.tar.gz
Do not sent 120 TEST UNIT READY requests on generic NOT READY statuses.
Some failing disks tend to return vendor-specific ASC/ASCQ codes with NOT READY sense key. It caused extremely long recovery attempts, repeating these 120 TURs (it takes at least 1 minute) for every I/O request. Instead of that use default error handling, doing just few retries. Reviewed by: ken, gibbs MFC after: 1 month
-rw-r--r--sys/cam/scsi/scsi_all.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c
index 205cf22..b28c29d 100644
--- a/sys/cam/scsi/scsi_all.c
+++ b/sys/cam/scsi/scsi_all.c
@@ -699,10 +699,7 @@ const struct sense_key_table_entry sense_key_table[] =
{
{ SSD_KEY_NO_SENSE, SS_NOP, "NO SENSE" },
{ SSD_KEY_RECOVERED_ERROR, SS_NOP|SSQ_PRINT_SENSE, "RECOVERED ERROR" },
- {
- SSD_KEY_NOT_READY, SS_TUR|SSQ_MANY|SSQ_DECREMENT_COUNT|EBUSY,
- "NOT READY"
- },
+ { SSD_KEY_NOT_READY, SS_RDEF, "NOT READY" },
{ SSD_KEY_MEDIUM_ERROR, SS_RDEF, "MEDIUM ERROR" },
{ SSD_KEY_HARDWARE_ERROR, SS_RDEF, "HARDWARE FAILURE" },
{ SSD_KEY_ILLEGAL_REQUEST, SS_FATAL|EINVAL, "ILLEGAL REQUEST" },
@@ -877,7 +874,7 @@ static struct asc_table_entry asc_table[] = {
{ SST(0x03, 0x02, SS_RDEF,
"Excessive write errors") },
/* DTLPWROMAEBKVF */
- { SST(0x04, 0x00, SS_TUR | SSQ_MANY | SSQ_DECREMENT_COUNT | EIO,
+ { SST(0x04, 0x00, SS_RDEF,
"Logical unit not ready, cause not reportable") },
/* DTLPWROMAEBKVF */
{ SST(0x04, 0x01, SS_TUR | SSQ_MANY | SSQ_DECREMENT_COUNT | EBUSY,
OpenPOWER on IntegriCloud