aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/bnx2i/bnx2i.h4
-rw-r--r--drivers/scsi/bnx2i/bnx2i_iscsi.c13
2 files changed, 13 insertions, 4 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i.h b/drivers/scsi/bnx2i/bnx2i.h
index fed1a686da67..69febb6f958b 100644
--- a/drivers/scsi/bnx2i/bnx2i.h
+++ b/drivers/scsi/bnx2i/bnx2i.h
@@ -308,6 +308,8 @@ struct iscsi_cid_queue {
308 * @dummy_buf_dma: DMA address of 'dummy_buffer' memory buffer 308 * @dummy_buf_dma: DMA address of 'dummy_buffer' memory buffer
309 * @lock: lock to synchonize access to hba structure 309 * @lock: lock to synchonize access to hba structure
310 * @hba_shutdown_tmo: Timeout value to shutdown each connection 310 * @hba_shutdown_tmo: Timeout value to shutdown each connection
311 * @conn_teardown_tmo: Timeout value to tear down each connection
312 * @conn_ctx_destroy_tmo: Timeout value to destroy context of each connection
311 * @pci_did: PCI device ID 313 * @pci_did: PCI device ID
312 * @pci_vid: PCI vendor ID 314 * @pci_vid: PCI vendor ID
313 * @pci_sdid: PCI subsystem device ID 315 * @pci_sdid: PCI subsystem device ID
@@ -387,6 +389,8 @@ struct bnx2i_hba {
387 struct mutex net_dev_lock;/* sync net device access */ 389 struct mutex net_dev_lock;/* sync net device access */
388 390
389 int hba_shutdown_tmo; 391 int hba_shutdown_tmo;
392 int conn_teardown_tmo;
393 int conn_ctx_destroy_tmo;
390 /* 394 /*
391 * PCI related info. 395 * PCI related info.
392 */ 396 */
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index 1600e7cae191..f6eebb39fe54 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)
854 spin_lock_init(&hba->lock); 854 spin_lock_init(&hba->lock);
855 mutex_init(&hba->net_dev_lock); 855 mutex_init(&hba->net_dev_lock);
856 init_waitqueue_head(&hba->eh_wait); 856 init_waitqueue_head(&hba->eh_wait);
857 if (test_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type)) 857 if (test_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type)) {
858 hba->hba_shutdown_tmo = 20 * HZ; 858 hba->hba_shutdown_tmo = 20 * HZ;
859 else /* 5706/5708/5709 */ 859 hba->conn_teardown_tmo = 20 * HZ;
860 hba->conn_ctx_destroy_tmo = 6 * HZ;
861 } else { /* 5706/5708/5709 */
860 hba->hba_shutdown_tmo = 20 * HZ; 862 hba->hba_shutdown_tmo = 20 * HZ;
863 hba->conn_teardown_tmo = 10 * HZ;
864 hba->conn_ctx_destroy_tmo = 2 * HZ;
865 }
861 866
862 if (iscsi_host_add(shost, &hba->pcidev->dev)) 867 if (iscsi_host_add(shost, &hba->pcidev->dev))
863 goto free_dump_mem; 868 goto free_dump_mem;
@@ -1633,7 +1638,7 @@ static int bnx2i_tear_down_conn(struct bnx2i_hba *hba,
1633 1638
1634 ep->state = EP_STATE_CLEANUP_START; 1639 ep->state = EP_STATE_CLEANUP_START;
1635 init_timer(&ep->ofld_timer); 1640 init_timer(&ep->ofld_timer);
1636 ep->ofld_timer.expires = 10*HZ + jiffies; 1641 ep->ofld_timer.expires = hba->conn_ctx_destroy_tmo + jiffies;
1637 ep->ofld_timer.function = bnx2i_ep_ofld_timer; 1642 ep->ofld_timer.function = bnx2i_ep_ofld_timer;
1638 ep->ofld_timer.data = (unsigned long) ep; 1643 ep->ofld_timer.data = (unsigned long) ep;
1639 add_timer(&ep->ofld_timer); 1644 add_timer(&ep->ofld_timer);
@@ -1937,7 +1942,7 @@ int bnx2i_hw_ep_disconnect(struct bnx2i_endpoint *bnx2i_ep)
1937 bnx2i_ep->state = EP_STATE_DISCONN_START; 1942 bnx2i_ep->state = EP_STATE_DISCONN_START;
1938 1943
1939 init_timer(&bnx2i_ep->ofld_timer); 1944 init_timer(&bnx2i_ep->ofld_timer);
1940 bnx2i_ep->ofld_timer.expires = 10*HZ + jiffies; 1945 bnx2i_ep->ofld_timer.expires = hba->conn_teardown_tmo + jiffies;
1941 bnx2i_ep->ofld_timer.function = bnx2i_ep_ofld_timer; 1946 bnx2i_ep->ofld_timer.function = bnx2i_ep_ofld_timer;
1942 bnx2i_ep->ofld_timer.data = (unsigned long) bnx2i_ep; 1947 bnx2i_ep->ofld_timer.data = (unsigned long) bnx2i_ep;
1943 add_timer(&bnx2i_ep->ofld_timer); 1948 add_timer(&bnx2i_ep->ofld_timer);