Skip to content

Commit

Permalink
[SCSI] bnx2i : Fix command session number jump issue seen during cabl…
Browse files Browse the repository at this point in the history
…e pull test

Without the fix bnx2i would fail tt->xmit_task() when link is down and
libiscsi would have already incremented session->cmdsn before calling bnx2i's
xmit_task() entry point and will just return the command to SCSI-ML when
xmit_task() fails. libiscsi does not retract the session->cmdsn as the command
was never sent on wire.  It is generally good idea for LLD, bnx2i to accept
the scsi cmnd/nopout and let upper layer timeout and go though normal session
recovery process.  When link is down, unsolicited nopout will not be accepted
by bnx2i and connection will never enter recovery state. This fix is required
for MPIO to work corectly

Signed-off-by: Anil Veerabhadrappa <anilgv@broadcom.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Anil Veerabhadrappa authored and James Bottomley committed Aug 22, 2009
1 parent 1d1b88d commit 534cc9c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/scsi/bnx2i/bnx2i_iscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1160,9 +1160,6 @@ static int bnx2i_task_xmit(struct iscsi_task *task)
struct bnx2i_cmd *cmd = task->dd_data;
struct iscsi_cmd *hdr = (struct iscsi_cmd *) task->hdr;

if (test_bit(ADAPTER_STATE_LINK_DOWN, &hba->adapter_state))
return -ENOTCONN;

if (!bnx2i_conn->is_bound)
return -ENOTCONN;

Expand Down

0 comments on commit 534cc9c

Please sign in to comment.