]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] ibmvfc: Fix invalid error response handling
authorBrian King <brking@linux.vnet.ibm.com>
Thu, 28 May 2009 21:17:22 +0000 (16:17 -0500)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 8 Jun 2009 18:07:29 +0000 (13:07 -0500)
Fix an obvious bug in processing error responses for SCSI commands
which can result in successful responses being incorrectly returned
with DID_ERROR.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/ibmvscsi/ibmvfc.c

index ea4abee7a2a95e8d783da6b7f82da2bc7f39aab8..879c51133c9554485627ec7c2582c8cc332ad6c7 100644 (file)
@@ -275,7 +275,7 @@ static int ibmvfc_get_err_result(struct ibmvfc_cmd *vfc_cmd)
        int fc_rsp_len = rsp->fcp_rsp_len;
 
        if ((rsp->flags & FCP_RSP_LEN_VALID) &&
-           ((!fc_rsp_len && fc_rsp_len != 4 && fc_rsp_len != 8) ||
+           ((fc_rsp_len && fc_rsp_len != 4 && fc_rsp_len != 8) ||
             rsp->data.info.rsp_code))
                return DID_ERROR << 16;