[SCSI] ibmvfc: Fix invalid error response handling

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, June 12, 2009 - 11:03 am

Gitweb:     http://git.kernel.org/linus/4a2837d4fcaf8a2c2ad61523287073d0c14b9ed0
Commit:     4a2837d4fcaf8a2c2ad61523287073d0c14b9ed0
Parent:     601e7638254c118fca135af9b1a9f35061420f62
Author:     Brian King <brking@linux.vnet.ibm.com>
AuthorDate: Thu May 28 16:17:22 2009 -0500
Committer:  James Bottomley <James.Bottomley@HansenPartnership.com>
CommitDate: Mon Jun 8 13:07:29 2009 -0500

    [SCSI] ibmvfc: Fix invalid error response handling
    
    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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index ea4abee..879c511 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -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;
 
--
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[SCSI] ibmvfc: Fix invalid error response handling, Linux Kernel Mailing ..., (Fri Jun 12, 11:03 am)