Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204184
b: refs/heads/master
c: e37d2c4
h: refs/heads/master
v: v3
  • Loading branch information
Eddie Wai authored and James Bottomley committed Jul 27, 2010
1 parent 3147171 commit 326bd79
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55e15c975cbf9ef8b765eba9ebadc96f2a2e5752
refs/heads/master: e37d2c4791480e27c2e2e4a556e4d2ba1d353ff8
4 changes: 4 additions & 0 deletions trunk/drivers/scsi/bnx2i/bnx2i.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ struct iscsi_cid_queue {
* @dummy_buf_dma: DMA address of 'dummy_buffer' memory buffer
* @lock: lock to synchonize access to hba structure
* @hba_shutdown_tmo: Timeout value to shutdown each connection
* @conn_teardown_tmo: Timeout value to tear down each connection
* @conn_ctx_destroy_tmo: Timeout value to destroy context of each connection
* @pci_did: PCI device ID
* @pci_vid: PCI vendor ID
* @pci_sdid: PCI subsystem device ID
Expand Down Expand Up @@ -387,6 +389,8 @@ struct bnx2i_hba {
struct mutex net_dev_lock;/* sync net device access */

int hba_shutdown_tmo;
int conn_teardown_tmo;
int conn_ctx_destroy_tmo;
/*
* PCI related info.
*/
Expand Down
13 changes: 9 additions & 4 deletions trunk/drivers/scsi/bnx2i/bnx2i_iscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 326bd79

Please sign in to comment.