From: Brian King Date: Thu, 28 May 2009 21:17:22 +0000 (-0500) Subject: [SCSI] ibmvfc: Fix invalid error response handling X-Git-Tag: v2.6.31-rc1~365^2~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a2837d4fcaf8a2c2ad61523287073d0c14b9ed0;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git [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 Signed-off-by: James Bottomley --- 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;