aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/virtio_net.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-11-04 13:48:30 -0500
committerDavid S. Miller <davem@davemloft.net>2013-11-04 13:48:30 -0500
commit394efd19d5fcae936261bd48e5b33b21897aacf8 (patch)
treec48cf3ddbb07fd87309f1abdf31a27c71330e587 /drivers/net/virtio_net.c
parentf421436a591d34fa5279b54a96ac07d70250cc8d (diff)
parentbe408cd3e1fef73e9408b196a79b9934697fe3b1 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/emulex/benet/be.h drivers/net/netconsole.c net/bridge/br_private.h Three mostly trivial conflicts. The net/bridge/br_private.h conflict was a function signature (argument addition) change overlapping with the extern removals from Joe Perches. In drivers/net/netconsole.c we had one change adjusting a printk message whilst another changed "printk(KERN_INFO" into "pr_info(". Lastly, the emulex change was a new inline function addition overlapping with Joe Perches's extern removals. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r--drivers/net/virtio_net.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 113ee93dbb2e..656a02e28e26 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1160,11 +1160,6 @@ static int virtnet_cpu_callback(struct notifier_block *nfb,
1160{ 1160{
1161 struct virtnet_info *vi = container_of(nfb, struct virtnet_info, nb); 1161 struct virtnet_info *vi = container_of(nfb, struct virtnet_info, nb);
1162 1162
1163 mutex_lock(&vi->config_lock);
1164
1165 if (!vi->config_enable)
1166 goto done;
1167
1168 switch(action & ~CPU_TASKS_FROZEN) { 1163 switch(action & ~CPU_TASKS_FROZEN) {
1169 case CPU_ONLINE: 1164 case CPU_ONLINE:
1170 case CPU_DOWN_FAILED: 1165 case CPU_DOWN_FAILED:
@@ -1178,8 +1173,6 @@ static int virtnet_cpu_callback(struct notifier_block *nfb,
1178 break; 1173 break;
1179 } 1174 }
1180 1175
1181done:
1182 mutex_unlock(&vi->config_lock);
1183 return NOTIFY_OK; 1176 return NOTIFY_OK;
1184} 1177}
1185 1178
@@ -1747,6 +1740,8 @@ static int virtnet_freeze(struct virtio_device *vdev)
1747 struct virtnet_info *vi = vdev->priv; 1740 struct virtnet_info *vi = vdev->priv;
1748 int i; 1741 int i;
1749 1742
1743 unregister_hotcpu_notifier(&vi->nb);
1744
1750 /* Prevent config work handler from accessing the device */ 1745 /* Prevent config work handler from accessing the device */
1751 mutex_lock(&vi->config_lock); 1746 mutex_lock(&vi->config_lock);
1752 vi->config_enable = false; 1747 vi->config_enable = false;
@@ -1795,6 +1790,10 @@ static int virtnet_restore(struct virtio_device *vdev)
1795 virtnet_set_queues(vi, vi->curr_queue_pairs); 1790 virtnet_set_queues(vi, vi->curr_queue_pairs);
1796 rtnl_unlock(); 1791 rtnl_unlock();
1797 1792
1793 err = register_hotcpu_notifier(&vi->nb);
1794 if (err)
1795 return err;
1796
1798 return 0; 1797 return 0;
1799} 1798}
1800#endif 1799#endif