Thomas,

Here's a patch which should resolve the reconnect issue that you're
seeing against the LH target.  Note that this fix has not been submitted
for upstream yet, but I like to see if it resolves your issue.  Please
verify.  Thanks.

Eddie

>From 9a3be4ed8b021fac6efd22c6695b7613a045d6cc Mon Sep 17 00:00:00 2001
From: Eddie Wai <[email protected]>
Date: Mon, 6 Dec 2010 15:21:41 -0800
Subject: [PATCH] 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 <[email protected]>
---
 drivers/scsi/bnx2i/bnx2i_hwi.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c
b/drivers/scsi/bnx2i/bnx2i_hwi.c
index 9375369..5442f1a 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);
-- 
1.7.0.5

On Mon, 2010-12-06 at 15:23 -0800, Eddie Wai wrote:
> 
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On 
> Behalf Of Thomas
> Sent: Wednesday, November 24, 2010 6:04 PM
> To: open-iscsi
> Subject: Re: bnx2i keeps losing the connection
> 
> On Nov 24, 2:40 pm, Mike Christie <[email protected]> wrote:
> 
> > For the abort/remote close case, I would look in the target logs to
> > check if the target dropped the session.
> 
> 
> My apologies if this just fills the forum with useless logs, but here
> are logs from two
> services (dbd_store and dbd_manager) on the LeftHand Portal (pxstor01,
> 10.0.1.1) during
> the event when the client (pxfs02, 10.0.1.12) loses the connection and
> reconnects again.
> 
> 
> Nov 23 02:59:48 pxstor01 dbd_store[4743]: ISCSI_WARN:Bad "Bytes
> 32-35": Got 138 expected 0.
> Nov 23 02:59:48 pxstor01 dbd_store[4743]:
> ISERVER_WARN:iscsi_nop_out_decap() failed
> Nov 23 02:59:48 pxstor01 dbd_store[4743]: ISERVER:session id 171
> closed by client
> Nov 23 02:59:48 pxstor01 dbd_store[4743]: ISERVER:iserver_session_fail
> session id 171 is_discovery 0 status full_feature
> Nov 23 02:59:48 pxstor01 dbd_store[4743]:
> DBD_MANAGER_BIN_CLIENT:op_xmit:client_seqno=4158430294250094924,
> client_type='gateway', filter=17
> Nov 23 02:59:48 pxstor01 dbd_store[4743]:
> DBD_MANAGER_BIN_CLIENT:op_reply:client_seqno=4158430294250094924,
> global_seqno=12214, status=ok, msg=ok
> Nov 23 02:59:48 pxstor01 dbd_store[4743]:
> ISERVER:iserver_session_finish session id 171
> Nov 23 02:59:52 pxstor01 dbd_store[4743]: ISERVER:add_session id 172
> client_sock 142 addr {inet=10.0.1.1;port=3260} peer_addr
> {inet=10.0.1.21;port=26602}
> Nov 23 02:59:52 pxstor01 dbd_store[4743]: ISERVER:session id 172
> initiator_name iqn.1994-05.com.redhat:pxfs02 target_name iqn.
> 2003-10.com.lefthandnetworks:pxstor:22:home chap_name=
> auth_name=pxfs02 RW=TT load_balance=T
> Nov 23 02:59:52 pxstor01 dbd_store[4743]: SCSI:dbd_scsi_it_status_set:
> vol: home status=ready
> Nov 23 02:59:52 pxstor01 dbd_store[4743]:
> DBD_MANAGER_BIN_CLIENT:op_xmit:client_seqno=4158430294250094925,
> client_type='gateway', filter=17
> Nov 23 02:59:52 pxstor01 dbd_store[4743]:
> DBD_MANAGER_BIN_CLIENT:op_reply:client_seqno=4158430294250094925,
> global_seqno=12215, status=ok, msg=ok
> Nov 23 02:59:52 pxstor01 dbd_store[4743]:
> ISERVER:iserver_session_start_full_feature session id 172 H/Ddigest=f/
> f
> 
> ---
> 
> Nov 23 02:59:48 pxstor01 dbd_manager[4815]: DBD_MANAGER_BIN:recv op-
> >client_type='gateway', op->filter=17
> client_seqno=4158430294250094924
> Nov 23 02:59:48 pxstor01 dbd_manager[4815]: DBD_MANAGER_BIN:try op-
> >client_type='gateway', op->filter=17, op-
> >client_seqno=4158430294250094924
> Nov 23 02:59:48 pxstor01 dbd_manager[4815]:
> DBD_GLOBAL_OPERATIONS:seqno=12214 client=gateway
> op=initiator_session_set4(volume=home(22), auth=pxfs02(26),
> gateway=10.0.1.1(2), target ip={inet=10.0.1.1;port=3260} initiator
> iqn=iqn.1994-05.com.redhat:pxfs02, initiator
> ip={inet=10.0.1.21;port=26090}, status=failed, isid=1361538187264
> tpgt=1 last_modified=197)
> Nov 23 02:59:48 pxstor01 dbd_manager[4815]:
> DBD_GLOBAL_OPERATIONS:seqno=12214 client=gateway
> op=initiator_session_set4(volume=home(22), auth=pxfs02(26),
> gateway=10.0.1.1(2), target ip={inet=10.0.1.1;port=3260} initiator
> iqn=iqn.1994-05.com.redhat:pxfs02, initiator
> ip={inet=10.0.1.21;port=26090}, status=failed, isid=1361538187264
> tpgt=1 last_modified=197)
> Nov 23 02:59:48 pxstor01 dbd_manager[4815]:
> DBD_MANAGER:GLOBAL_OP:seqno=12214 client=gateway
> client_seqno=4158430294250094924
> op=initiator_session_set4(volume=home(22), auth=pxfs02(26),
> gateway=10.0.1.1(2), target ip={inet=10.0.1.1;port=3260} initiator
> iqn=iqn.1994-05.com.redhat:pxfs02, initiator
> ip={inet=10.0.1.21;port=26090}, status=failed, isid=1361538187264
> tpgt=1 last_modified=197) reply=ok message='ok'
> Nov 23 02:59:48 pxstor01 dbd_manager[4815]: DBD_MANAGER_BIN:sending
> op_reply(client_seqno=4158430294250094924, global_seqno=12214,
> status=ok)
> Nov 23 02:59:52 pxstor01 dbd_manager[4815]: DBD_MANAGER_BIN:recv op-
> >client_type='gateway', op->filter=17
> client_seqno=4158430294250094925
> Nov 23 02:59:52 pxstor01 dbd_manager[4815]: DBD_MANAGER_BIN:try op-
> >client_type='gateway', op->filter=17, op-
> >client_seqno=4158430294250094925
> Nov 23 02:59:52 pxstor01 dbd_manager[4815]:
> DBD_GLOBAL_OPERATIONS:seqno=12215 client=gateway
> op=initiator_session_set4(volume=home(22), auth=pxfs02(26),
> gateway=10.0.1.1(2), target ip={inet=10.0.1.1;port=3260} initiator
> iqn=iqn.1994-05.com.redhat:pxfs02, initiator
> ip={inet=10.0.1.21;port=26602}, status=connected, isid=1361538187264
> tpgt=1 last_modified=198)
> Nov 23 02:59:52 pxstor01 dbd_manager[4815]:
> DBD_GLOBAL_OPERATIONS:seqno=12215 client=gateway
> op=initiator_session_set4(volume=home(22), auth=pxfs02(26),
> gateway=10.0.1.1(2), target ip={inet=10.0.1.1;port=3260} initiator
> iqn=iqn.1994-05.com.redhat:pxfs02, initiator
> ip={inet=10.0.1.21;port=26602}, status=connected, isid=1361538187264
> tpgt=1 last_modified=198)
> Nov 23 02:59:52 pxstor01 dbd_manager[4815]:
> DBD_MANAGER:GLOBAL_OP:seqno=12215 client=gateway
> client_seqno=4158430294250094925
> op=initiator_session_set4(volume=home(22), auth=pxfs02(26),
> gateway=10.0.1.1(2), target ip={inet=10.0.1.1;port=3260} initiator
> iqn=iqn.1994-05.com.redhat:pxfs02, initiator
> ip={inet=10.0.1.21;port=26602}, status=connected, isid=1361538187264
> tpgt=1 last_modified=198) reply=ok message='ok'
> Nov 23 02:59:52 pxstor01 dbd_manager[4815]: DBD_MANAGER_BIN:sending
> op_reply(client_seqno=4158430294250094925, global_seqno=12215,
> status=ok)
> 
> 


-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.

Reply via email to