aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2i/bnx2i_iscsi.c
diff options
context:
space:
mode:
authorEddie Wai <eddie.wai@broadcom.com>2010-11-23 18:29:23 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:24:11 -0500
commit5bf3f39f9bda2750145a7da69ea9ae76d0054956 (patch)
tree3f6bb4ebe9309fbdc331e4443a148dfd071679e7 /drivers/scsi/bnx2i/bnx2i_iscsi.c
parentcf464fc5eb272f3f5964560ef2b8d632333afe0d (diff)
[SCSI] bnx2i: Fixed a cid leak issue for 5771X (10g)
A cid leak issue was found when the connect destroy request exceeded the driver's disconnection timeout. This will lead to a cid resource leak issue. The fix is to allow the cid cleanup even when this happens. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Acked-by: Anil Veerabhadrappa <anilgv@broadcom.com> Reviewed-by: Michael Chan <mchan@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.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index fb50efbce087..b7668122cf19 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -1640,18 +1640,26 @@ no_nx2_route:
1640static int bnx2i_tear_down_conn(struct bnx2i_hba *hba, 1640static int bnx2i_tear_down_conn(struct bnx2i_hba *hba,
1641 struct bnx2i_endpoint *ep) 1641 struct bnx2i_endpoint *ep)
1642{ 1642{
1643 if (test_bit(BNX2I_CNIC_REGISTERED, &hba->reg_with_cnic)) 1643 if (test_bit(BNX2I_CNIC_REGISTERED, &hba->reg_with_cnic) && ep->cm_sk)
1644 hba->cnic->cm_destroy(ep->cm_sk); 1644 hba->cnic->cm_destroy(ep->cm_sk);
1645 1645
1646 if (test_bit(ADAPTER_STATE_GOING_DOWN, &ep->hba->adapter_state))
1647 ep->state = EP_STATE_DISCONN_COMPL;
1648
1649 if (test_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type) && 1646 if (test_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type) &&
1650 ep->state == EP_STATE_DISCONN_TIMEDOUT) { 1647 ep->state == EP_STATE_DISCONN_TIMEDOUT) {
1651 printk(KERN_ALERT "bnx2i - ERROR - please submit GRC Dump," 1648 if (ep->conn && ep->conn->cls_conn &&
1652 " NW/PCIe trace, driver msgs to developers" 1649 ep->conn->cls_conn->dd_data) {
1653 " for analysis\n"); 1650 struct iscsi_conn *conn = ep->conn->cls_conn->dd_data;
1654 return 1; 1651
1652 /* Must suspend all rx queue activity for this ep */
1653 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx);
1654 }
1655 /* CONN_DISCONNECT timeout may or may not be an issue depending
1656 * on what transcribed in TCP layer, different targets behave
1657 * differently
1658 */
1659 printk(KERN_ALERT "bnx2i (%s): - WARN - CONN_DISCON timed out, "
1660 "please submit GRC Dump, NW/PCIe trace, "
1661 "driver msgs to developers for analysis\n",
1662 hba->netdev->name);
1655 } 1663 }
1656 1664
1657 ep->state = EP_STATE_CLEANUP_START; 1665 ep->state = EP_STATE_CLEANUP_START;