Skip to content

Commit

Permalink
[SCSI] ibmvfc: Fix invalid error response handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Brian King authored and James Bottomley committed Jun 8, 2009
1 parent 601e763 commit 4a2837d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/ibmvscsi/ibmvfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 4a2837d

Please sign in to comment.