From: Eduardo Otubo <otubo@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, xen-devel@lists.xenproject.org,
jgross@suse.com, boris.ostrovsky@oracle.com, vkuznets@redhat.com,
mgamal@redhat.com, cavery@redhat.com
Subject: [PATCH] xen-netfront: enable device after manual module load
Date: Fri, 5 Jan 2018 09:42:16 +0100 [thread overview]
Message-ID: <20180105084216.21719-1-otubo@redhat.com> (raw)
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>
---
drivers/net/xen-netfront.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index c5a34671abda..9bd7ddeeb6a5 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1326,6 +1326,7 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)
netif_carrier_off(netdev);
+ xenbus_switch_state(dev, XenbusStateInitialising);
return netdev;
exit:
--
2.14.3
next reply other threads:[~2018-01-05 8:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-05 8:42 Eduardo Otubo [this message]
2018-01-08 15:03 ` [Xen-devel] [PATCH] xen-netfront: enable device after manual module load Boris Ostrovsky
2018-01-08 19:17 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180105084216.21719-1-otubo@redhat.com \
--to=otubo@redhat.com \
--cc=boris.ostrovsky@oracle.com \
--cc=cavery@redhat.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgamal@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=vkuznets@redhat.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).