diff options
author | David Howells <dhowells@redhat.com> | 2006-11-22 09:57:56 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2006-11-22 09:57:56 -0500 |
commit | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (patch) | |
tree | 1c4c89652c62a75da09f9b9442012007e4ac6250 /drivers/message/fusion/mptlan.c | |
parent | 65f27f38446e1976cc98fd3004b110fedcddd189 (diff) |
WorkStruct: make allyesconfig
Fix up for make allyesconfig.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/message/fusion/mptlan.c')
-rw-r--r-- | drivers/message/fusion/mptlan.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c index 314c3a27585d..b7c4407c5e3f 100644 --- a/drivers/message/fusion/mptlan.c +++ b/drivers/message/fusion/mptlan.c | |||
@@ -111,7 +111,8 @@ struct mpt_lan_priv { | |||
111 | u32 total_received; | 111 | u32 total_received; |
112 | struct net_device_stats stats; /* Per device statistics */ | 112 | struct net_device_stats stats; /* Per device statistics */ |
113 | 113 | ||
114 | struct work_struct post_buckets_task; | 114 | struct delayed_work post_buckets_task; |
115 | struct net_device *dev; | ||
115 | unsigned long post_buckets_active; | 116 | unsigned long post_buckets_active; |
116 | }; | 117 | }; |
117 | 118 | ||
@@ -132,7 +133,7 @@ static int lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, | |||
132 | static int mpt_lan_open(struct net_device *dev); | 133 | static int mpt_lan_open(struct net_device *dev); |
133 | static int mpt_lan_reset(struct net_device *dev); | 134 | static int mpt_lan_reset(struct net_device *dev); |
134 | static int mpt_lan_close(struct net_device *dev); | 135 | static int mpt_lan_close(struct net_device *dev); |
135 | static void mpt_lan_post_receive_buckets(void *dev_id); | 136 | static void mpt_lan_post_receive_buckets(struct mpt_lan_priv *priv); |
136 | static void mpt_lan_wake_post_buckets_task(struct net_device *dev, | 137 | static void mpt_lan_wake_post_buckets_task(struct net_device *dev, |
137 | int priority); | 138 | int priority); |
138 | static int mpt_lan_receive_post_turbo(struct net_device *dev, u32 tmsg); | 139 | static int mpt_lan_receive_post_turbo(struct net_device *dev, u32 tmsg); |
@@ -345,7 +346,7 @@ mpt_lan_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) | |||
345 | priv->mpt_rxfidx[++priv->mpt_rxfidx_tail] = i; | 346 | priv->mpt_rxfidx[++priv->mpt_rxfidx_tail] = i; |
346 | spin_unlock_irqrestore(&priv->rxfidx_lock, flags); | 347 | spin_unlock_irqrestore(&priv->rxfidx_lock, flags); |
347 | } else { | 348 | } else { |
348 | mpt_lan_post_receive_buckets(dev); | 349 | mpt_lan_post_receive_buckets(priv); |
349 | netif_wake_queue(dev); | 350 | netif_wake_queue(dev); |
350 | } | 351 | } |
351 | 352 | ||
@@ -441,7 +442,7 @@ mpt_lan_open(struct net_device *dev) | |||
441 | 442 | ||
442 | dlprintk((KERN_INFO MYNAM "/lo: Finished initializing RcvCtl\n")); | 443 | dlprintk((KERN_INFO MYNAM "/lo: Finished initializing RcvCtl\n")); |
443 | 444 | ||
444 | mpt_lan_post_receive_buckets(dev); | 445 | mpt_lan_post_receive_buckets(priv); |
445 | printk(KERN_INFO MYNAM ": %s/%s: interface up & active\n", | 446 | printk(KERN_INFO MYNAM ": %s/%s: interface up & active\n", |
446 | IOC_AND_NETDEV_NAMES_s_s(dev)); | 447 | IOC_AND_NETDEV_NAMES_s_s(dev)); |
447 | 448 | ||
@@ -854,7 +855,7 @@ mpt_lan_wake_post_buckets_task(struct net_device *dev, int priority) | |||
854 | 855 | ||
855 | if (test_and_set_bit(0, &priv->post_buckets_active) == 0) { | 856 | if (test_and_set_bit(0, &priv->post_buckets_active) == 0) { |
856 | if (priority) { | 857 | if (priority) { |
857 | schedule_work(&priv->post_buckets_task); | 858 | schedule_delayed_work(&priv->post_buckets_task, 0); |
858 | } else { | 859 | } else { |
859 | schedule_delayed_work(&priv->post_buckets_task, 1); | 860 | schedule_delayed_work(&priv->post_buckets_task, 1); |
860 | dioprintk((KERN_INFO MYNAM ": post_buckets queued on " | 861 | dioprintk((KERN_INFO MYNAM ": post_buckets queued on " |
@@ -1188,10 +1189,9 @@ mpt_lan_receive_post_reply(struct net_device *dev, | |||
1188 | /* Simple SGE's only at the moment */ | 1189 | /* Simple SGE's only at the moment */ |
1189 | 1190 | ||
1190 | static void | 1191 | static void |
1191 | mpt_lan_post_receive_buckets(void *dev_id) | 1192 | mpt_lan_post_receive_buckets(struct mpt_lan_priv *priv) |
1192 | { | 1193 | { |
1193 | struct net_device *dev = dev_id; | 1194 | struct net_device *dev = priv->dev; |
1194 | struct mpt_lan_priv *priv = dev->priv; | ||
1195 | MPT_ADAPTER *mpt_dev = priv->mpt_dev; | 1195 | MPT_ADAPTER *mpt_dev = priv->mpt_dev; |
1196 | MPT_FRAME_HDR *mf; | 1196 | MPT_FRAME_HDR *mf; |
1197 | LANReceivePostRequest_t *pRecvReq; | 1197 | LANReceivePostRequest_t *pRecvReq; |
@@ -1335,6 +1335,13 @@ out: | |||
1335 | clear_bit(0, &priv->post_buckets_active); | 1335 | clear_bit(0, &priv->post_buckets_active); |
1336 | } | 1336 | } |
1337 | 1337 | ||
1338 | static void | ||
1339 | mpt_lan_post_receive_buckets_work(struct work_struct *work) | ||
1340 | { | ||
1341 | mpt_lan_post_receive_buckets(container_of(work, struct mpt_lan_priv, | ||
1342 | post_buckets_task.work)); | ||
1343 | } | ||
1344 | |||
1338 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 1345 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
1339 | static struct net_device * | 1346 | static struct net_device * |
1340 | mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum) | 1347 | mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum) |
@@ -1350,11 +1357,13 @@ mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum) | |||
1350 | 1357 | ||
1351 | priv = netdev_priv(dev); | 1358 | priv = netdev_priv(dev); |
1352 | 1359 | ||
1360 | priv->dev = dev; | ||
1353 | priv->mpt_dev = mpt_dev; | 1361 | priv->mpt_dev = mpt_dev; |
1354 | priv->pnum = pnum; | 1362 | priv->pnum = pnum; |
1355 | 1363 | ||
1356 | memset(&priv->post_buckets_task, 0, sizeof(struct work_struct)); | 1364 | memset(&priv->post_buckets_task, 0, sizeof(priv->post_buckets_task)); |
1357 | INIT_WORK(&priv->post_buckets_task, mpt_lan_post_receive_buckets, dev); | 1365 | INIT_DELAYED_WORK(&priv->post_buckets_task, |
1366 | mpt_lan_post_receive_buckets_work); | ||
1358 | priv->post_buckets_active = 0; | 1367 | priv->post_buckets_active = 0; |
1359 | 1368 | ||
1360 | dlprintk((KERN_INFO MYNAM "@%d: bucketlen = %d\n", | 1369 | dlprintk((KERN_INFO MYNAM "@%d: bucketlen = %d\n", |