summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorEduardo Otubo <otubo@redhat.com>2018-01-05 09:42:16 +0100
committerSasha Levin <alexander.levin@microsoft.com>2018-03-20 23:49:46 -0400
commit71af42a5681b918e67bcf52bae1db20b1304985f (patch)
tree6eb0c50cf881c73b0aebf877eb49322c37fdbab2 /drivers
parent3102df24ffc3151330259ce49ae305abb8b7f256 (diff)
xen-netfront: enable device after manual module load
[ Upstream commit b707fda2df4070785d0fa8a278aa13944c5f51f8 ] When loading the module after unloading it, the network interface would not be enabled and thus wouldn't have a backend counterpart and unable to be used by the guest. The guest would face errors like: [root@guest ~]# ethtool -i eth0 Cannot get driver information: No such device [root@guest ~]# ifconfig eth0 eth0: error fetching interface information: Device not found This patch initializes the state of the netfront device whenever it is loaded manually, this state would communicate the netback to create its device and establish the connection between them. Signed-off-by: Eduardo Otubo <otubo@redhat.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/xen-netfront.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 9e8461466534..fd9f6ce14e8e 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1284,6 +1284,7 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)
netif_carrier_off(netdev);
+ xenbus_switch_state(dev, XenbusStateInitialising);
return netdev;
exit: