summaryrefslogtreecommitdiff
path: root/drivers/scsi/bnx2i/bnx2i_iscsi.c
diff options
context:
space:
mode:
authorEddie Wai <eddie.wai@broadcom.com>2010-07-01 22:34:53 (GMT)
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 17:03:59 (GMT)
commite37d2c4791480e27c2e2e4a556e4d2ba1d353ff8 (patch)
tree25e5526cecab3bd1359b3b8468dc2ce0ba7116d9 /drivers/scsi/bnx2i/bnx2i_iscsi.c
parent55e15c975cbf9ef8b765eba9ebadc96f2a2e5752 (diff)
downloadlinux-fsl-qoriq-e37d2c4791480e27c2e2e4a556e4d2ba1d353ff8.tar.xz
[SCSI] bnx2i: Fine tuned conn destroy and context destroy timeout values
Added variables to separate the fine tuned timeout values for connection destroy and context destroy for both 1g and 10g devices. v2: Extended the 5771X disconnect timeout from 10s to 20s as the firmware has a retransmission timeout of 16s. This fixes one of the iscsi_endpoint leak issues when the target is slow or non-responsive to our TCP FIN. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Acked-by: Anil Veerabhadrappa <anilgv@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.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index 1600e7ca..f6eebb3 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -854,10 +854,15 @@ struct bnx2i_hba *bnx2i_alloc_hba(struct cnic_dev *cnic)
spin_lock_init(&hba->lock);
mutex_init(&hba->net_dev_lock);
init_waitqueue_head(&hba->eh_wait);
- if (test_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type))
+ if (test_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type)) {
hba->hba_shutdown_tmo = 20 * HZ;
- else /* 5706/5708/5709 */
+ hba->conn_teardown_tmo = 20 * HZ;
+ hba->conn_ctx_destroy_tmo = 6 * HZ;
+ } else { /* 5706/5708/5709 */
hba->hba_shutdown_tmo = 20 * HZ;
+ hba->conn_teardown_tmo = 10 * HZ;
+ hba->conn_ctx_destroy_tmo = 2 * HZ;
+ }
if (iscsi_host_add(shost, &hba->pcidev->dev))
goto free_dump_mem;
@@ -1633,7 +1638,7 @@ static int bnx2i_tear_down_conn(struct bnx2i_hba *hba,
ep->state = EP_STATE_CLEANUP_START;
init_timer(&ep->ofld_timer);
- ep->ofld_timer.expires = 10*HZ + jiffies;
+ ep->ofld_timer.expires = hba->conn_ctx_destroy_tmo + jiffies;
ep->ofld_timer.function = bnx2i_ep_ofld_timer;
ep->ofld_timer.data = (unsigned long) ep;
add_timer(&ep->ofld_timer);
@@ -1937,7 +1942,7 @@ int bnx2i_hw_ep_disconnect(struct bnx2i_endpoint *bnx2i_ep)
bnx2i_ep->state = EP_STATE_DISCONN_START;
init_timer(&bnx2i_ep->ofld_timer);
- bnx2i_ep->ofld_timer.expires = 10*HZ + jiffies;
+ bnx2i_ep->ofld_timer.expires = hba->conn_teardown_tmo + jiffies;
bnx2i_ep->ofld_timer.function = bnx2i_ep_ofld_timer;
bnx2i_ep->ofld_timer.data = (unsigned long) bnx2i_ep;
add_timer(&bnx2i_ep->ofld_timer);