aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/xen-netfront.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 922ce0abf5cf..a57daecf1d57 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1810,7 +1810,7 @@ static int talk_to_netback(struct xenbus_device *dev,
1810 err = xen_net_read_mac(dev, info->netdev->dev_addr); 1810 err = xen_net_read_mac(dev, info->netdev->dev_addr);
1811 if (err) { 1811 if (err) {
1812 xenbus_dev_fatal(dev, err, "parsing %s/mac", dev->nodename); 1812 xenbus_dev_fatal(dev, err, "parsing %s/mac", dev->nodename);
1813 goto out; 1813 goto out_unlocked;
1814 } 1814 }
1815 1815
1816 rtnl_lock(); 1816 rtnl_lock();
@@ -1925,6 +1925,7 @@ abort_transaction_no_dev_fatal:
1925 xennet_destroy_queues(info); 1925 xennet_destroy_queues(info);
1926 out: 1926 out:
1927 rtnl_unlock(); 1927 rtnl_unlock();
1928out_unlocked:
1928 device_unregister(&dev->dev); 1929 device_unregister(&dev->dev);
1929 return err; 1930 return err;
1930} 1931}
@@ -1950,10 +1951,6 @@ static int xennet_connect(struct net_device *dev)
1950 /* talk_to_netback() sets the correct number of queues */ 1951 /* talk_to_netback() sets the correct number of queues */
1951 num_queues = dev->real_num_tx_queues; 1952 num_queues = dev->real_num_tx_queues;
1952 1953
1953 rtnl_lock();
1954 netdev_update_features(dev);
1955 rtnl_unlock();
1956
1957 if (dev->reg_state == NETREG_UNINITIALIZED) { 1954 if (dev->reg_state == NETREG_UNINITIALIZED) {
1958 err = register_netdev(dev); 1955 err = register_netdev(dev);
1959 if (err) { 1956 if (err) {
@@ -1963,6 +1960,10 @@ static int xennet_connect(struct net_device *dev)
1963 } 1960 }
1964 } 1961 }
1965 1962
1963 rtnl_lock();
1964 netdev_update_features(dev);
1965 rtnl_unlock();
1966
1966 /* 1967 /*
1967 * All public and private state should now be sane. Get 1968 * All public and private state should now be sane. Get
1968 * ready to start sending and receiving packets and give the driver 1969 * ready to start sending and receiving packets and give the driver