aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 12:54:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 12:54:49 -0400
commit033d9959ed2dc1029217d4165f80a71702dc578e (patch)
tree3d306316e44bdabce2e0bf2ef7e466e525f90b4c /drivers/net
parent974a847e00cf3ff1695e62b276892137893706ab (diff)
parent7c6e72e46c9ea4a88f3f8ba96edce9db4bd48726 (diff)
Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue changes from Tejun Heo: "This is workqueue updates for v3.7-rc1. A lot of activities this round including considerable API and behavior cleanups. * delayed_work combines a timer and a work item. The handling of the timer part has always been a bit clunky leading to confusing cancelation API with weird corner-case behaviors. delayed_work is updated to use new IRQ safe timer and cancelation now works as expected. * Another deficiency of delayed_work was lack of the counterpart of mod_timer() which led to cancel+queue combinations or open-coded timer+work usages. mod_delayed_work[_on]() are added. These two delayed_work changes make delayed_work provide interface and behave like timer which is executed with process context. * A work item could be executed concurrently on multiple CPUs, which is rather unintuitive and made flush_work() behavior confusing and half-broken under certain circumstances. This problem doesn't exist for non-reentrant workqueues. While non-reentrancy check isn't free, the overhead is incurred only when a work item bounces across different CPUs and even in simulated pathological scenario the overhead isn't too high. All workqueues are made non-reentrant. This removes the distinction between flush_[delayed_]work() and flush_[delayed_]_work_sync(). The former is now as strong as the latter and the specified work item is guaranteed to have finished execution of any previous queueing on return. * In addition to the various bug fixes, Lai redid and simplified CPU hotplug handling significantly. * Joonsoo introduced system_highpri_wq and used it during CPU hotplug. There are two merge commits - one to pull in IRQ safe timer from tip/timers/core and the other to pull in CPU hotplug fixes from wq/for-3.6-fixes as Lai's hotplug restructuring depended on them." Fixed a number of trivial conflicts, but the more interesting conflicts were silent ones where the deprecated interfaces had been used by new code in the merge window, and thus didn't cause any real data conflicts. Tejun pointed out a few of them, I fixed a couple more. * 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (46 commits) workqueue: remove spurious WARN_ON_ONCE(in_irq()) from try_to_grab_pending() workqueue: use cwq_set_max_active() helper for workqueue_set_max_active() workqueue: introduce cwq_set_max_active() helper for thaw_workqueues() workqueue: remove @delayed from cwq_dec_nr_in_flight() workqueue: fix possible stall on try_to_grab_pending() of a delayed work item workqueue: use hotcpu_notifier() for workqueue_cpu_down_callback() workqueue: use __cpuinit instead of __devinit for cpu callbacks workqueue: rename manager_mutex to assoc_mutex workqueue: WORKER_REBIND is no longer necessary for idle rebinding workqueue: WORKER_REBIND is no longer necessary for busy rebinding workqueue: reimplement idle worker rebinding workqueue: deprecate __cancel_delayed_work() workqueue: reimplement cancel_delayed_work() using try_to_grab_pending() workqueue: use mod_delayed_work() instead of __cancel + queue workqueue: use irqsafe timer for delayed_work workqueue: clean up delayed_work initializers and add missing one workqueue: make deferrable delayed_work initializer names consistent workqueue: cosmetic whitespace updates for macro definitions workqueue: deprecate system_nrt[_freezable]_wq workqueue: deprecate flush[_delayed]_work_sync() ...
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/sense.c2
-rw-r--r--drivers/net/ethernet/neterion/vxge/vxge-main.c2
-rw-r--r--drivers/net/ethernet/sun/cassini.c2
-rw-r--r--drivers/net/ethernet/sun/niu.c2
-rw-r--r--drivers/net/virtio_net.c12
-rw-r--r--drivers/net/wireless/hostap/hostap_ap.c4
-rw-r--r--drivers/net/wireless/hostap/hostap_hw.c10
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2100.c8
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c3
10 files changed, 22 insertions, 25 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
index 875bbb999aa..9c9f3260344 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
@@ -1394,7 +1394,7 @@ static int offload_close(struct t3cdev *tdev)
1394 sysfs_remove_group(&tdev->lldev->dev.kobj, &offload_attr_group); 1394 sysfs_remove_group(&tdev->lldev->dev.kobj, &offload_attr_group);
1395 1395
1396 /* Flush work scheduled while releasing TIDs */ 1396 /* Flush work scheduled while releasing TIDs */
1397 flush_work_sync(&td->tid_release_task); 1397 flush_work(&td->tid_release_task);
1398 1398
1399 tdev->lldev = NULL; 1399 tdev->lldev = NULL;
1400 cxgb3_set_dummy_ops(tdev); 1400 cxgb3_set_dummy_ops(tdev);
diff --git a/drivers/net/ethernet/mellanox/mlx4/sense.c b/drivers/net/ethernet/mellanox/mlx4/sense.c
index 34ee09bae36..094773d88f8 100644
--- a/drivers/net/ethernet/mellanox/mlx4/sense.c
+++ b/drivers/net/ethernet/mellanox/mlx4/sense.c
@@ -139,5 +139,5 @@ void mlx4_sense_init(struct mlx4_dev *dev)
139 for (port = 1; port <= dev->caps.num_ports; port++) 139 for (port = 1; port <= dev->caps.num_ports; port++)
140 sense->do_sense_port[port] = 1; 140 sense->do_sense_port[port] = 1;
141 141
142 INIT_DELAYED_WORK_DEFERRABLE(&sense->sense_poll, mlx4_sense_port); 142 INIT_DEFERRABLE_WORK(&sense->sense_poll, mlx4_sense_port);
143} 143}
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c
index cfa71a30dc8..3e5b7509502 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-main.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c
@@ -3521,7 +3521,7 @@ static void vxge_device_unregister(struct __vxge_hw_device *hldev)
3521 3521
3522 strncpy(buf, dev->name, IFNAMSIZ); 3522 strncpy(buf, dev->name, IFNAMSIZ);
3523 3523
3524 flush_work_sync(&vdev->reset_task); 3524 flush_work(&vdev->reset_task);
3525 3525
3526 /* in 2.6 will call stop() if device is up */ 3526 /* in 2.6 will call stop() if device is up */
3527 unregister_netdev(dev); 3527 unregister_netdev(dev);
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c
index ce4df61b4b5..c8251be104d 100644
--- a/drivers/net/ethernet/sun/cassini.c
+++ b/drivers/net/ethernet/sun/cassini.c
@@ -3890,7 +3890,7 @@ static int cas_change_mtu(struct net_device *dev, int new_mtu)
3890 schedule_work(&cp->reset_task); 3890 schedule_work(&cp->reset_task);
3891#endif 3891#endif
3892 3892
3893 flush_work_sync(&cp->reset_task); 3893 flush_work(&cp->reset_task);
3894 return 0; 3894 return 0;
3895} 3895}
3896 3896
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 3208dca6675..8419bf385e0 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -9927,7 +9927,7 @@ static int niu_suspend(struct pci_dev *pdev, pm_message_t state)
9927 if (!netif_running(dev)) 9927 if (!netif_running(dev))
9928 return 0; 9928 return 0;
9929 9929
9930 flush_work_sync(&np->reset_task); 9930 flush_work(&np->reset_task);
9931 niu_netif_stop(np); 9931 niu_netif_stop(np);
9932 9932
9933 del_timer_sync(&np->timer); 9933 del_timer_sync(&np->timer);
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 83d2b0c34c5..9650c413e11 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -521,7 +521,7 @@ static void refill_work(struct work_struct *work)
521 /* In theory, this can happen: if we don't get any buffers in 521 /* In theory, this can happen: if we don't get any buffers in
522 * we will *never* try to fill again. */ 522 * we will *never* try to fill again. */
523 if (still_empty) 523 if (still_empty)
524 queue_delayed_work(system_nrt_wq, &vi->refill, HZ/2); 524 schedule_delayed_work(&vi->refill, HZ/2);
525} 525}
526 526
527static int virtnet_poll(struct napi_struct *napi, int budget) 527static int virtnet_poll(struct napi_struct *napi, int budget)
@@ -540,7 +540,7 @@ again:
540 540
541 if (vi->num < vi->max / 2) { 541 if (vi->num < vi->max / 2) {
542 if (!try_fill_recv(vi, GFP_ATOMIC)) 542 if (!try_fill_recv(vi, GFP_ATOMIC))
543 queue_delayed_work(system_nrt_wq, &vi->refill, 0); 543 schedule_delayed_work(&vi->refill, 0);
544 } 544 }
545 545
546 /* Out of packets? */ 546 /* Out of packets? */
@@ -745,7 +745,7 @@ static int virtnet_open(struct net_device *dev)
745 745
746 /* Make sure we have some buffers: if oom use wq. */ 746 /* Make sure we have some buffers: if oom use wq. */
747 if (!try_fill_recv(vi, GFP_KERNEL)) 747 if (!try_fill_recv(vi, GFP_KERNEL))
748 queue_delayed_work(system_nrt_wq, &vi->refill, 0); 748 schedule_delayed_work(&vi->refill, 0);
749 749
750 virtnet_napi_enable(vi); 750 virtnet_napi_enable(vi);
751 return 0; 751 return 0;
@@ -1020,7 +1020,7 @@ static void virtnet_config_changed(struct virtio_device *vdev)
1020{ 1020{
1021 struct virtnet_info *vi = vdev->priv; 1021 struct virtnet_info *vi = vdev->priv;
1022 1022
1023 queue_work(system_nrt_wq, &vi->config_work); 1023 schedule_work(&vi->config_work);
1024} 1024}
1025 1025
1026static int init_vqs(struct virtnet_info *vi) 1026static int init_vqs(struct virtnet_info *vi)
@@ -1152,7 +1152,7 @@ static int virtnet_probe(struct virtio_device *vdev)
1152 otherwise get link status from config. */ 1152 otherwise get link status from config. */
1153 if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_STATUS)) { 1153 if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_STATUS)) {
1154 netif_carrier_off(dev); 1154 netif_carrier_off(dev);
1155 queue_work(system_nrt_wq, &vi->config_work); 1155 schedule_work(&vi->config_work);
1156 } else { 1156 } else {
1157 vi->status = VIRTIO_NET_S_LINK_UP; 1157 vi->status = VIRTIO_NET_S_LINK_UP;
1158 netif_carrier_on(dev); 1158 netif_carrier_on(dev);
@@ -1264,7 +1264,7 @@ static int virtnet_restore(struct virtio_device *vdev)
1264 netif_device_attach(vi->dev); 1264 netif_device_attach(vi->dev);
1265 1265
1266 if (!try_fill_recv(vi, GFP_KERNEL)) 1266 if (!try_fill_recv(vi, GFP_KERNEL))
1267 queue_delayed_work(system_nrt_wq, &vi->refill, 0); 1267 schedule_delayed_work(&vi->refill, 0);
1268 1268
1269 mutex_lock(&vi->config_lock); 1269 mutex_lock(&vi->config_lock);
1270 vi->config_enable = true; 1270 vi->config_enable = true;
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c
index e1f41027724..c6ea995750d 100644
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -860,10 +860,10 @@ void hostap_free_data(struct ap_data *ap)
860 return; 860 return;
861 } 861 }
862 862
863 flush_work_sync(&ap->add_sta_proc_queue); 863 flush_work(&ap->add_sta_proc_queue);
864 864
865#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT 865#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT
866 flush_work_sync(&ap->wds_oper_queue); 866 flush_work(&ap->wds_oper_queue);
867 if (ap->crypt) 867 if (ap->crypt)
868 ap->crypt->deinit(ap->crypt_priv); 868 ap->crypt->deinit(ap->crypt_priv);
869 ap->crypt = ap->crypt_priv = NULL; 869 ap->crypt = ap->crypt_priv = NULL;
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index 50f87b60b0b..8e7000fd441 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -3311,13 +3311,13 @@ static void prism2_free_local_data(struct net_device *dev)
3311 3311
3312 unregister_netdev(local->dev); 3312 unregister_netdev(local->dev);
3313 3313
3314 flush_work_sync(&local->reset_queue); 3314 flush_work(&local->reset_queue);
3315 flush_work_sync(&local->set_multicast_list_queue); 3315 flush_work(&local->set_multicast_list_queue);
3316 flush_work_sync(&local->set_tim_queue); 3316 flush_work(&local->set_tim_queue);
3317#ifndef PRISM2_NO_STATION_MODES 3317#ifndef PRISM2_NO_STATION_MODES
3318 flush_work_sync(&local->info_queue); 3318 flush_work(&local->info_queue);
3319#endif 3319#endif
3320 flush_work_sync(&local->comms_qual_update); 3320 flush_work(&local->comms_qual_update);
3321 3321
3322 lib80211_crypt_info_free(&local->crypt_info); 3322 lib80211_crypt_info_free(&local->crypt_info);
3323 3323
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index 83324b32165..534e6557e7e 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -2181,8 +2181,7 @@ static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status)
2181 2181
2182 /* Make sure the RF Kill check timer is running */ 2182 /* Make sure the RF Kill check timer is running */
2183 priv->stop_rf_kill = 0; 2183 priv->stop_rf_kill = 0;
2184 cancel_delayed_work(&priv->rf_kill); 2184 mod_delayed_work(system_wq, &priv->rf_kill, round_jiffies_relative(HZ));
2185 schedule_delayed_work(&priv->rf_kill, round_jiffies_relative(HZ));
2186} 2185}
2187 2186
2188static void send_scan_event(void *data) 2187static void send_scan_event(void *data)
@@ -4322,9 +4321,8 @@ static int ipw_radio_kill_sw(struct ipw2100_priv *priv, int disable_radio)
4322 "disabled by HW switch\n"); 4321 "disabled by HW switch\n");
4323 /* Make sure the RF_KILL check timer is running */ 4322 /* Make sure the RF_KILL check timer is running */
4324 priv->stop_rf_kill = 0; 4323 priv->stop_rf_kill = 0;
4325 cancel_delayed_work(&priv->rf_kill); 4324 mod_delayed_work(system_wq, &priv->rf_kill,
4326 schedule_delayed_work(&priv->rf_kill, 4325 round_jiffies_relative(HZ));
4327 round_jiffies_relative(HZ));
4328 } else 4326 } else
4329 schedule_reset(priv); 4327 schedule_reset(priv);
4330 } 4328 }
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index af83c43bcdb..ef2b171e351 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -1164,8 +1164,7 @@ void zd_usb_reset_rx_idle_timer(struct zd_usb *usb)
1164{ 1164{
1165 struct zd_usb_rx *rx = &usb->rx; 1165 struct zd_usb_rx *rx = &usb->rx;
1166 1166
1167 cancel_delayed_work(&rx->idle_work); 1167 mod_delayed_work(zd_workqueue, &rx->idle_work, ZD_RX_IDLE_INTERVAL);
1168 queue_delayed_work(zd_workqueue, &rx->idle_work, ZD_RX_IDLE_INTERVAL);
1169} 1168}
1170 1169
1171static inline void init_usb_interrupt(struct zd_usb *usb) 1170static inline void init_usb_interrupt(struct zd_usb *usb)