From: Eddie Wai Date: Sun, 9 Jan 2011 02:00:24 +0000 (-0800) Subject: [SCSI] bnx2i: Added reconnect fix connecting against Lefthand targets X-Git-Tag: upstream/snapshot3+hdmi~11187^2~144 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=70e14722718ea3fc66400924f7a99c7d8c62b8ff;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [SCSI] bnx2i: Added reconnect fix connecting against Lefthand targets The nopout's reserved field was not being initialized to zero before being reused. Stale CDB values from previous SCSI cmds of the same BHS offset was the cause of the disconnection initiated by the Lefthand target. Signed-off-by: Eddie Wai Reviewed-by: Mike Christie Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c index 96505e3..603db9d 100644 --- a/drivers/scsi/bnx2i/bnx2i_hwi.c +++ b/drivers/scsi/bnx2i/bnx2i_hwi.c @@ -490,6 +490,9 @@ int bnx2i_send_iscsi_nopout(struct bnx2i_conn *bnx2i_conn, bnx2i_cmd = (struct bnx2i_cmd *)task->dd_data; nopout_hdr = (struct iscsi_nopout *)task->hdr; nopout_wqe = (struct bnx2i_nop_out_request *)ep->qp.sq_prod_qe; + + memset(nopout_wqe, 0x00, sizeof(struct bnx2i_nop_out_request)); + nopout_wqe->op_code = nopout_hdr->opcode; nopout_wqe->op_attr = ISCSI_FLAG_CMD_FINAL; memcpy(nopout_wqe->lun, nopout_hdr->lun, 8);