aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/chelsio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/chelsio')
-rw-r--r--drivers/net/chelsio/common.h2
-rw-r--r--drivers/net/chelsio/cxgb2.c16
2 files changed, 10 insertions, 8 deletions
diff --git a/drivers/net/chelsio/common.h b/drivers/net/chelsio/common.h
index 5d9dd14427c5..8b1bedbce0d5 100644
--- a/drivers/net/chelsio/common.h
+++ b/drivers/net/chelsio/common.h
@@ -209,7 +209,7 @@ struct adapter {
209 struct peespi *espi; 209 struct peespi *espi;
210 210
211 struct port_info port[MAX_NPORTS]; 211 struct port_info port[MAX_NPORTS];
212 struct work_struct stats_update_task; 212 struct delayed_work stats_update_task;
213 struct timer_list stats_update_timer; 213 struct timer_list stats_update_timer;
214 214
215 struct semaphore mib_mutex; 215 struct semaphore mib_mutex;
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c
index ad7ff9641a7e..f607cc6a276b 100644
--- a/drivers/net/chelsio/cxgb2.c
+++ b/drivers/net/chelsio/cxgb2.c
@@ -927,10 +927,11 @@ static void t1_netpoll(struct net_device *dev)
927 * Periodic accumulation of MAC statistics. This is used only if the MAC 927 * Periodic accumulation of MAC statistics. This is used only if the MAC
928 * does not have any other way to prevent stats counter overflow. 928 * does not have any other way to prevent stats counter overflow.
929 */ 929 */
930static void mac_stats_task(void *data) 930static void mac_stats_task(struct work_struct *work)
931{ 931{
932 int i; 932 int i;
933 struct adapter *adapter = data; 933 struct adapter *adapter =
934 container_of(work, struct adapter, stats_update_task.work);
934 935
935 for_each_port(adapter, i) { 936 for_each_port(adapter, i) {
936 struct port_info *p = &adapter->port[i]; 937 struct port_info *p = &adapter->port[i];
@@ -951,9 +952,10 @@ static void mac_stats_task(void *data)
951/* 952/*
952 * Processes elmer0 external interrupts in process context. 953 * Processes elmer0 external interrupts in process context.
953 */ 954 */
954static void ext_intr_task(void *data) 955static void ext_intr_task(struct work_struct *work)
955{ 956{
956 struct adapter *adapter = data; 957 struct adapter *adapter =
958 container_of(work, struct adapter, ext_intr_handler_task);
957 959
958 elmer0_ext_intr_handler(adapter); 960 elmer0_ext_intr_handler(adapter);
959 961
@@ -1087,9 +1089,9 @@ static int __devinit init_one(struct pci_dev *pdev,
1087 spin_lock_init(&adapter->async_lock); 1089 spin_lock_init(&adapter->async_lock);
1088 1090
1089 INIT_WORK(&adapter->ext_intr_handler_task, 1091 INIT_WORK(&adapter->ext_intr_handler_task,
1090 ext_intr_task, adapter); 1092 ext_intr_task);
1091 INIT_WORK(&adapter->stats_update_task, mac_stats_task, 1093 INIT_DELAYED_WORK(&adapter->stats_update_task,
1092 adapter); 1094 mac_stats_task);
1093#ifdef work_struct 1095#ifdef work_struct
1094 init_timer(&adapter->stats_update_timer); 1096 init_timer(&adapter->stats_update_timer);
1095 adapter->stats_update_timer.function = mac_stats_timer; 1097 adapter->stats_update_timer.function = mac_stats_timer;