Received: by 10.223.185.116 with SMTP id b49csp8508650wrg; Fri, 2 Mar 2018 03:07:27 -0800 (PST) X-Google-Smtp-Source: AG47ELtMStq91xWdJz0EOVlMCeTDYjhSsK77PyNvNs2Wxrc+GsfllM/TMAYFl7Z1VTX0M1SbTYVp X-Received: by 2002:a17:902:887:: with SMTP id 7-v6mr4898286pll.89.1519988847369; Fri, 02 Mar 2018 03:07:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519988847; cv=none; d=google.com; s=arc-20160816; b=hrXqnOJVG5RPOS4uRrl/QJlMLwLQWEaG8riBnBFZkELXY129GIw8GUSOLbDs/l3h3Y ZjJ8mWnI/ZjgYjrLSpGNtg2nwf7Vx5rrez057Z3WtJtutEN1Aab/yLodla+KvqkBMdzj SrDfZ89hHJfnM1XlFo1PVFumNV6fO2sMvMm8vwqUS3BXKxFHKwZd8jWlnldqOKcK1Tvm umSMpmuZTqp6j09CNZCtwVodtlDhcjDf+T7uqhN07Op0qQWeifyaApo4+KdDx1JV0i3L TuaaezmCxfK48GWUtpuD5rzeQ1pbLCENz+dV6FY9oQiDO5Tuyb3r8n0EofNXWE9SAgfF pEOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=1UkJJRYATthk9mA+e09yK7DmgZcJGO4aWRB9DZ0e7i4=; b=UY3NgIXXa4gVxvoFmu5RbemhLgHlW2Oayn0EsArHMIV+B11w56UZ8Xn2g55OusyONc dk3Ku8M1E7rTECPzY/1yACbiYX6x2buwOWdUHPYBKmASomFceRWJi1opyzTgmSwAKvyg asESjWsTMVbMP38SU8kYswa4nz2QgAFbpYXMYcs7t3z3lnFcd8Vtz4KaqmhVgnlReODb vC9Y6kfrfFcRR6j1BR7MK9E2SSNLOJLM4KM/7lGokmPwQ2+Tp8bPLowA9D+ruqSiO+TP uQ7PbRN4l+tcnb1elNSfH5ir/sz2Pprnhnnk7pG0QJAZPEbT+7sJyD+uIUOnC16jcIZp hHxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64-v6si4739286ply.209.2018.03.02.03.07.12; Fri, 02 Mar 2018 03:07:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423129AbeCBIzH (ORCPT + 99 others); Fri, 2 Mar 2018 03:55:07 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:50670 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423524AbeCBIzE (ORCPT ); Fri, 2 Mar 2018 03:55:04 -0500 Received: from localhost (clnet-b04-243.ikbnet.co.at [83.175.124.243]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A0C801231; Fri, 2 Mar 2018 08:55:03 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eduardo Otubo , Boris Ostrovsky , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 27/34] xen-netfront: enable device after manual module load Date: Fri, 2 Mar 2018 09:51:23 +0100 Message-Id: <20180302084437.763619472@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180302084435.842679610@linuxfoundation.org> References: <20180302084435.842679610@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eduardo Otubo [ 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 Reviewed-by: Boris Ostrovsky Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/xen-netfront.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1331,6 +1331,7 @@ static struct net_device *xennet_create_ netif_carrier_off(netdev); + xenbus_switch_state(dev, XenbusStateInitialising); return netdev; exit: