]> git.baikalelectronics.ru Git - kernel.git/commit
xen-netfront: enable device after manual module load
authorEduardo Otubo <otubo@redhat.com>
Fri, 5 Jan 2018 08:42:16 +0000 (09:42 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jan 2018 19:17:03 +0000 (14:17 -0500)
commit1e58cbddacf5c2e13c559f742a2f959c1aae73aa
treee4cf95d5208645ccc1869e4071c7a51ab700c78f
parentf825ff9ea1a3ce9e37a2a3a068a450916ffb9141
xen-netfront: enable device after manual module load

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>
drivers/net/xen-netfront.c