mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 09:30:53 +07:00
Merge branch 'xen-netfront-fixes'
Ross Lagerwall says: ==================== xen-netfront: Fix issues with commitf599c64fdf
Fix a couple of issues with commitf599c64fdf
("xen-netfront: Fix race between device setup and open"). ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
962c661f14
@ -1810,7 +1810,7 @@ static int talk_to_netback(struct xenbus_device *dev,
|
|||||||
err = xen_net_read_mac(dev, info->netdev->dev_addr);
|
err = xen_net_read_mac(dev, info->netdev->dev_addr);
|
||||||
if (err) {
|
if (err) {
|
||||||
xenbus_dev_fatal(dev, err, "parsing %s/mac", dev->nodename);
|
xenbus_dev_fatal(dev, err, "parsing %s/mac", dev->nodename);
|
||||||
goto out;
|
goto out_unlocked;
|
||||||
}
|
}
|
||||||
|
|
||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
@ -1925,6 +1925,7 @@ static int talk_to_netback(struct xenbus_device *dev,
|
|||||||
xennet_destroy_queues(info);
|
xennet_destroy_queues(info);
|
||||||
out:
|
out:
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
|
out_unlocked:
|
||||||
device_unregister(&dev->dev);
|
device_unregister(&dev->dev);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
@ -1950,10 +1951,6 @@ static int xennet_connect(struct net_device *dev)
|
|||||||
/* talk_to_netback() sets the correct number of queues */
|
/* talk_to_netback() sets the correct number of queues */
|
||||||
num_queues = dev->real_num_tx_queues;
|
num_queues = dev->real_num_tx_queues;
|
||||||
|
|
||||||
rtnl_lock();
|
|
||||||
netdev_update_features(dev);
|
|
||||||
rtnl_unlock();
|
|
||||||
|
|
||||||
if (dev->reg_state == NETREG_UNINITIALIZED) {
|
if (dev->reg_state == NETREG_UNINITIALIZED) {
|
||||||
err = register_netdev(dev);
|
err = register_netdev(dev);
|
||||||
if (err) {
|
if (err) {
|
||||||
@ -1963,6 +1960,10 @@ static int xennet_connect(struct net_device *dev)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rtnl_lock();
|
||||||
|
netdev_update_features(dev);
|
||||||
|
rtnl_unlock();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* All public and private state should now be sane. Get
|
* All public and private state should now be sane. Get
|
||||||
* ready to start sending and receiving packets and give the driver
|
* ready to start sending and receiving packets and give the driver
|
||||||
|
Loading…
Reference in New Issue
Block a user