Skip to content

Commit d0b7a90

Browse files
mwilckmartinkpetersen
authored andcommitted
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>
1 parent d1b4909 commit d0b7a90

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/scsi/scsi_error.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,8 @@ int scsi_check_sense(struct scsi_cmnd *scmd)
580580
if (sshdr.asc == 0x20 || /* Invalid command operation code */
581581
sshdr.asc == 0x21 || /* Logical block address out of range */
582582
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 */
584585
set_host_byte(scmd, DID_TARGET_FAILURE);
585586
}
586587
return SUCCESS;

0 commit comments

Comments
 (0)