diff options
-rw-r--r-- | drivers/scsi/bnx2i/bnx2i.h | 2 | ||||
-rw-r--r-- | drivers/scsi/bnx2i/bnx2i_hwi.c | 4 | ||||
-rw-r--r-- | drivers/scsi/bnx2i/bnx2i_iscsi.c | 15 |
3 files changed, 7 insertions, 14 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i.h b/drivers/scsi/bnx2i/bnx2i.h index 89ef1a1678d1..663a63d4dae4 100644 --- a/drivers/scsi/bnx2i/bnx2i.h +++ b/drivers/scsi/bnx2i/bnx2i.h | |||
@@ -858,7 +858,7 @@ extern int bnx2i_alloc_qp_resc(struct bnx2i_hba *hba, | |||
858 | struct bnx2i_endpoint *ep); | 858 | struct bnx2i_endpoint *ep); |
859 | extern void bnx2i_free_qp_resc(struct bnx2i_hba *hba, | 859 | extern void bnx2i_free_qp_resc(struct bnx2i_hba *hba, |
860 | struct bnx2i_endpoint *ep); | 860 | struct bnx2i_endpoint *ep); |
861 | extern void bnx2i_ep_ofld_timer(unsigned long data); | 861 | extern void bnx2i_ep_ofld_timer(struct timer_list *t); |
862 | extern struct bnx2i_endpoint *bnx2i_find_ep_in_ofld_list( | 862 | extern struct bnx2i_endpoint *bnx2i_find_ep_in_ofld_list( |
863 | struct bnx2i_hba *hba, u32 iscsi_cid); | 863 | struct bnx2i_hba *hba, u32 iscsi_cid); |
864 | extern struct bnx2i_endpoint *bnx2i_find_ep_in_destroy_list( | 864 | extern struct bnx2i_endpoint *bnx2i_find_ep_in_destroy_list( |
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c index 42921dbba927..61a93994d5ed 100644 --- a/drivers/scsi/bnx2i/bnx2i_hwi.c +++ b/drivers/scsi/bnx2i/bnx2i_hwi.c | |||
@@ -698,9 +698,9 @@ void bnx2i_update_iscsi_conn(struct iscsi_conn *conn) | |||
698 | * | 698 | * |
699 | * routine to handle connection offload/destroy request timeout | 699 | * routine to handle connection offload/destroy request timeout |
700 | */ | 700 | */ |
701 | void bnx2i_ep_ofld_timer(unsigned long data) | 701 | void bnx2i_ep_ofld_timer(struct timer_list *t) |
702 | { | 702 | { |
703 | struct bnx2i_endpoint *ep = (struct bnx2i_endpoint *) data; | 703 | struct bnx2i_endpoint *ep = from_timer(ep, t, ofld_timer); |
704 | 704 | ||
705 | if (ep->state == EP_STATE_OFLD_START) { | 705 | if (ep->state == EP_STATE_OFLD_START) { |
706 | printk(KERN_ALERT "ofld_timer: CONN_OFLD timeout\n"); | 706 | printk(KERN_ALERT "ofld_timer: CONN_OFLD timeout\n"); |
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c index 03c104b47f31..de0a507577ef 100644 --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c | |||
@@ -1611,9 +1611,8 @@ static int bnx2i_conn_start(struct iscsi_cls_conn *cls_conn) | |||
1611 | * this should normally not sleep for a long time so it should | 1611 | * this should normally not sleep for a long time so it should |
1612 | * not disrupt the caller. | 1612 | * not disrupt the caller. |
1613 | */ | 1613 | */ |
1614 | timer_setup(&bnx2i_conn->ep->ofld_timer, bnx2i_ep_ofld_timer, 0); | ||
1614 | bnx2i_conn->ep->ofld_timer.expires = 1 * HZ + jiffies; | 1615 | bnx2i_conn->ep->ofld_timer.expires = 1 * HZ + jiffies; |
1615 | bnx2i_conn->ep->ofld_timer.function = bnx2i_ep_ofld_timer; | ||
1616 | bnx2i_conn->ep->ofld_timer.data = (unsigned long) bnx2i_conn->ep; | ||
1617 | add_timer(&bnx2i_conn->ep->ofld_timer); | 1616 | add_timer(&bnx2i_conn->ep->ofld_timer); |
1618 | /* update iSCSI context for this conn, wait for CNIC to complete */ | 1617 | /* update iSCSI context for this conn, wait for CNIC to complete */ |
1619 | wait_event_interruptible(bnx2i_conn->ep->ofld_wait, | 1618 | wait_event_interruptible(bnx2i_conn->ep->ofld_wait, |
@@ -1729,10 +1728,8 @@ static int bnx2i_tear_down_conn(struct bnx2i_hba *hba, | |||
1729 | } | 1728 | } |
1730 | 1729 | ||
1731 | ep->state = EP_STATE_CLEANUP_START; | 1730 | ep->state = EP_STATE_CLEANUP_START; |
1732 | init_timer(&ep->ofld_timer); | 1731 | timer_setup(&ep->ofld_timer, bnx2i_ep_ofld_timer, 0); |
1733 | ep->ofld_timer.expires = hba->conn_ctx_destroy_tmo + jiffies; | 1732 | ep->ofld_timer.expires = hba->conn_ctx_destroy_tmo + jiffies; |
1734 | ep->ofld_timer.function = bnx2i_ep_ofld_timer; | ||
1735 | ep->ofld_timer.data = (unsigned long) ep; | ||
1736 | add_timer(&ep->ofld_timer); | 1733 | add_timer(&ep->ofld_timer); |
1737 | 1734 | ||
1738 | bnx2i_ep_destroy_list_add(hba, ep); | 1735 | bnx2i_ep_destroy_list_add(hba, ep); |
@@ -1835,10 +1832,8 @@ static struct iscsi_endpoint *bnx2i_ep_connect(struct Scsi_Host *shost, | |||
1835 | bnx2i_ep->state = EP_STATE_OFLD_START; | 1832 | bnx2i_ep->state = EP_STATE_OFLD_START; |
1836 | bnx2i_ep_ofld_list_add(hba, bnx2i_ep); | 1833 | bnx2i_ep_ofld_list_add(hba, bnx2i_ep); |
1837 | 1834 | ||
1838 | init_timer(&bnx2i_ep->ofld_timer); | 1835 | timer_setup(&bnx2i_ep->ofld_timer, bnx2i_ep_ofld_timer, 0); |
1839 | bnx2i_ep->ofld_timer.expires = 2 * HZ + jiffies; | 1836 | bnx2i_ep->ofld_timer.expires = 2 * HZ + jiffies; |
1840 | bnx2i_ep->ofld_timer.function = bnx2i_ep_ofld_timer; | ||
1841 | bnx2i_ep->ofld_timer.data = (unsigned long) bnx2i_ep; | ||
1842 | add_timer(&bnx2i_ep->ofld_timer); | 1837 | add_timer(&bnx2i_ep->ofld_timer); |
1843 | 1838 | ||
1844 | if (bnx2i_send_conn_ofld_req(hba, bnx2i_ep)) { | 1839 | if (bnx2i_send_conn_ofld_req(hba, bnx2i_ep)) { |
@@ -2054,10 +2049,8 @@ int bnx2i_hw_ep_disconnect(struct bnx2i_endpoint *bnx2i_ep) | |||
2054 | session = conn->session; | 2049 | session = conn->session; |
2055 | } | 2050 | } |
2056 | 2051 | ||
2057 | init_timer(&bnx2i_ep->ofld_timer); | 2052 | timer_setup(&bnx2i_ep->ofld_timer, bnx2i_ep_ofld_timer, 0); |
2058 | bnx2i_ep->ofld_timer.expires = hba->conn_teardown_tmo + jiffies; | 2053 | bnx2i_ep->ofld_timer.expires = hba->conn_teardown_tmo + jiffies; |
2059 | bnx2i_ep->ofld_timer.function = bnx2i_ep_ofld_timer; | ||
2060 | bnx2i_ep->ofld_timer.data = (unsigned long) bnx2i_ep; | ||
2061 | add_timer(&bnx2i_ep->ofld_timer); | 2054 | add_timer(&bnx2i_ep->ofld_timer); |
2062 | 2055 | ||
2063 | if (!test_bit(BNX2I_CNIC_REGISTERED, &hba->reg_with_cnic)) | 2056 | if (!test_bit(BNX2I_CNIC_REGISTERED, &hba->reg_with_cnic)) |