aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Wilck <mwilck@suse.com>2017-09-27 08:44:19 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2017-09-27 21:55:21 -0400
commitd0b7a9095c0730b92a0a2eecaba2e6b77ed87339 (patch)
treeeb5345db3f594de1f1a8ef4e79ea8eee232da696
parentd1b490939d8c117a06dfc562c41d933f71d30289 (diff)
scsi: ILLEGAL REQUEST + ASC==27 => target failure
ASC 0x27 is "WRITE PROTECTED". This error code is returned e.g. by Fujitsu ETERNUS systems under certain conditions for WRITE SAME 16 commands with UNMAP bit set. It should not be treated as a path error. In general, it makes sense to assume that being write protected is a target rather than a path property. Signed-off-by: Martin Wilck <mwilck@suse.com> Acked-by: Lee Duncan <lduncan@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/scsi_error.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 38942050b265..dab876c65473 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -580,7 +580,8 @@ int scsi_check_sense(struct scsi_cmnd *scmd)
580 if (sshdr.asc == 0x20 || /* Invalid command operation code */ 580 if (sshdr.asc == 0x20 || /* Invalid command operation code */
581 sshdr.asc == 0x21 || /* Logical block address out of range */ 581 sshdr.asc == 0x21 || /* Logical block address out of range */
582 sshdr.asc == 0x24 || /* Invalid field in cdb */ 582 sshdr.asc == 0x24 || /* Invalid field in cdb */
583 sshdr.asc == 0x26) { /* Parameter value invalid */ 583 sshdr.asc == 0x26 || /* Parameter value invalid */
584 sshdr.asc == 0x27) { /* Write protected */
584 set_host_byte(scmd, DID_TARGET_FAILURE); 585 set_host_byte(scmd, DID_TARGET_FAILURE);
585 } 586 }
586 return SUCCESS; 587 return SUCCESS;