Received: by 10.223.176.5 with SMTP id f5csp809432wra; Sat, 3 Feb 2018 10:47:10 -0800 (PST) X-Google-Smtp-Source: AH8x227QbGC7pZj5Q3tKaSH7JgdbRUYHBQDieezKuyTogTcoRuOeuK2yz03XpkB8dKT080mZngAf X-Received: by 10.101.67.130 with SMTP id m2mr33211554pgp.301.1517683630598; Sat, 03 Feb 2018 10:47:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517683630; cv=none; d=google.com; s=arc-20160816; b=s/eUCNqAGXa2elIFOsetpf3XADqSZdNNge9LD6mvQ6hzdoKxiTMFO0zvR+IvMYpwDh 4i5Jo8MMUitMJ7pxEKE+Sh2cRkED+sgkP83URy34tBlPHjZP3Ir0/DrcdZZb3Ni6BrEw Fcwpf6ITmWQotOaBAMHCpmkSJJoYAupL4Qo+hejebFH9j76YBhbbS6Wy6qV3U/m1VvUM 24LiSwMTus+PtxKRBamN8ceSzNuKGwOtybVo8FV+vr7Ou45n95fUv0Uksp7nWe8Ch3AS ztT90Rg2wWaE9hUFiNczXS4B1fk6/6DwwTQYB1BbetRAX5DvfQJMgotIQh3C/M+rpNfZ wmpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=u3lBFrDsz80cBIHevI1bf9+SuMzUfVo+g0k2ImymEvc=; b=L52ozTVqTSsvnUWcBdQH67NP3Owp7A7B4+KnMCA90ACCG2LFNXVzU9e5zDZ80g5QUy gaZHqtSvRtmHn4JnQmEfrSgJ0062yYE/8UBS975W9/WZjv7FBuHgqH6tXWPUgpOV5iHT hfcRlUZfaD9d6eDEa8F+Fwej6uMlZtc/SbvnDDtWF5RfNAXyVE5ASYOLJ32Op/IssN64 jJhDx6W7rd2k9R8WIz5/43txal6dYGwuYGeGv26IZYuL02isLSV7oICWBhUNFmchwfni koF+QbTDKRIwpN6uUQE49YFktuf70d2+o8V0T1oflGbuX073A3DU2R/PN5F1vp5loFfz phJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=P0R1yYHH; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i11si3236470pgq.332.2018.02.03.10.46.55; Sat, 03 Feb 2018 10:47:10 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=P0R1yYHH; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755327AbeBCSpx (ORCPT + 99 others); Sat, 3 Feb 2018 13:45:53 -0500 Received: from mail-bl2nam02on0091.outbound.protection.outlook.com ([104.47.38.91]:45338 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752761AbeBCSCx (ORCPT ); Sat, 3 Feb 2018 13:02:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=u3lBFrDsz80cBIHevI1bf9+SuMzUfVo+g0k2ImymEvc=; b=P0R1yYHH1QsidL/nYmqkqKvaxvyW2u7IloczlZjBYVjVf/i5Wav08uL5/ExTBwjRSyF2FUVDpQnW3tV4fCtfKBlLea5UNCahI3qOmUJY4amTmnUgatVw/7vju42o6hpHSdfy9pvIDp1Vsv2LM8LW0RR4cx66tb0oJxEMXVDijTY= Received: from BL0PR2101MB1027.namprd21.prod.outlook.com (52.132.20.161) by BL0PR2101MB0993.namprd21.prod.outlook.com (52.132.23.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.5; Sat, 3 Feb 2018 18:02:51 +0000 Received: from BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9]) by BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9%3]) with mapi id 15.20.0485.006; Sat, 3 Feb 2018 18:02:50 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Eduardo Otubo , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 100/110] xen-netfront: enable device after manual module load Thread-Topic: [PATCH AUTOSEL for 4.14 100/110] xen-netfront: enable device after manual module load Thread-Index: AQHTnRkFUKhkUU0JwkGaMLYYDvYf3g== Date: Sat, 3 Feb 2018 18:01:31 +0000 Message-ID: <20180203180015.29073-100-alexander.levin@microsoft.com> References: <20180203180015.29073-1-alexander.levin@microsoft.com> In-Reply-To: <20180203180015.29073-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BL0PR2101MB0993;7:PqzgkbYg3LSFInmlRM5/5etKHaPHD6p5w4l0ZG5jlICz8Okvlx4c03Gx9GWpMSpLrPNqbPjllB9UrOs7msE+DJUze/q9Rp2ShemSzewLR6E5o0wppFzvBJSy8jR1WanFdXBrBrjbdTsK/SMRZ31qyhuPLEmLunI+bDvGsz99TjOr989siU/FmNJXMj5qw5qfy3/yvHDhZfdO9zfdj/vceH94FOokgAuQCh4XF0ICaEBPD9ULZtsvaKfWn4XRVg1d x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: a8f7e412-7660-40ab-c5c3-08d56b305747 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7193020);SRVR:BL0PR2101MB0993; x-ms-traffictypediagnostic: BL0PR2101MB0993: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(146099531331640); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231101)(2400082)(944501161)(93006095)(93001095)(6055026)(61426038)(61427038)(6041288)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:BL0PR2101MB0993;BCL:0;PCL:0;RULEID:;SRVR:BL0PR2101MB0993; x-forefront-prvs: 05724A8921 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(979002)(346002)(39380400002)(39860400002)(376002)(366004)(396003)(189003)(199004)(6436002)(186003)(3660700001)(8936002)(105586002)(2906002)(6346003)(6116002)(3280700002)(3846002)(97736004)(6486002)(1076002)(2950100002)(6666003)(81156014)(86362001)(575784001)(76176011)(102836004)(2501003)(5250100002)(26005)(68736007)(10090500001)(81166006)(8676002)(53936002)(5660300001)(22452003)(305945005)(107886003)(7736002)(4326008)(86612001)(36756003)(99286004)(316002)(6512007)(10290500003)(72206003)(6506007)(14454004)(478600001)(25786009)(106356001)(2900100001)(54906003)(110136005)(66066001)(22906009)(217873001)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:BL0PR2101MB0993;H:BL0PR2101MB1027.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: QBEdwfoHTZah6X4tXHjamHlzHbmgCIvS+t6eAVBQfjEbHMMVqaH/G/wOg1t2nheyxbKumj1bxYxcjKQ3Y+7dlg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8f7e412-7660-40ab-c5c3-08d56b305747 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2018 18:01:31.3940 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB0993 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 391432e2725d..c980cdbd6e53 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 xe= nbus_device *dev) =20 netif_carrier_off(netdev); =20 + xenbus_switch_state(dev, XenbusStateInitialising); return netdev; =20 exit: --=20 2.11.0