[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    scsi: ILLEGAL REQUEST + ASC==27 => target failure
From:       "Linux Kernel Mailing List" <linux-kernel () vger ! kernel ! org>
Date:       2017-09-30 20:03:03
Message-ID: 20170930200303.B2B8D21B63 () pdx-korg-gitolite-1 ! ci ! codeaurora ! org
[Download RAW message or body]

Web:        https://git.kernel.org/torvalds/c/d0b7a9095c0730b92a0a2eecaba2e6b77ed87339
Commit:     d0b7a9095c0730b92a0a2eecaba2e6b77ed87339
Parent:     d1b490939d8c117a06dfc562c41d933f71d30289
Refname:    refs/heads/master
Author:     Martin Wilck <mwilck@suse.com>
AuthorDate: Wed Sep 27 14:44:19 2017 +0200
Committer:  Martin K. Petersen <martin.petersen@oracle.com>
CommitDate: Wed Sep 27 21:55:21 2017 -0400

    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>
---
 drivers/scsi/scsi_error.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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)
 		if (sshdr.asc == 0x20 || /* Invalid command operation code */
 		    sshdr.asc == 0x21 || /* Logical block address out of range */
 		    sshdr.asc == 0x24 || /* Invalid field in cdb */
-		    sshdr.asc == 0x26) { /* Parameter value invalid */
+		    sshdr.asc == 0x26 || /* Parameter value invalid */
+		    sshdr.asc == 0x27) { /* Write protected */
 			set_host_byte(scmd, DID_TARGET_FAILURE);
 		}
 		return SUCCESS;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic