summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2i/bnx2i_iscsi.c
diff options
context:
space:
mode:
authorEddie Wai <eddie.wai@broadcom.com>2010-08-13 01:44:30 +0200
committerJames Bottomley <James.Bottomley@suse.de>2010-09-05 19:51:16 +0200
commit250ae982e2864aa0e06a09137382f44e58b51683 (patch)
treefde480c10f393bbd4c6ea1d2af3e189d2d6f415e /drivers/scsi/bnx2i/bnx2i_iscsi.c
parent[SCSI] bnx2i: Recouple the CFC delete cleanup with cm_abort/close completion (diff)
downloadlinux-250ae982e2864aa0e06a09137382f44e58b51683.tar.xz
linux-250ae982e2864aa0e06a09137382f44e58b51683.zip
[SCSI] bnx2i: Added chip cleanup for the remove module path
In the case when an ep_connect request is interrupted due to route request stall, if the iSCSI daemon is terminated by the user, the chip will be left in a state which will not get cleaned up upon module removal. Upon module reload, when the same context id is used for a new connection, chip panic would occur. This patch adds chip cleanup in the module removal path. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Acked-by: Benjamin Li <benli@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bnx2i/bnx2i_iscsi.c')
-rw-r--r--drivers/scsi/bnx2i/bnx2i_iscsi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index 0425540d4814..fb50efbce087 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -1953,6 +1953,9 @@ int bnx2i_hw_ep_disconnect(struct bnx2i_endpoint *bnx2i_ep)
if (!cnic)
return 0;
+ if (bnx2i_ep->state == EP_STATE_IDLE)
+ return 0;
+
if (!bnx2i_ep_tcp_conn_active(bnx2i_ep))
goto destroy_conn;