Received: by 10.192.165.148 with SMTP id m20csp17866imm; Wed, 9 May 2018 08:08:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp6KKslPwunoGneQHwv2zI6Ts+6Skt2eyTS40JmmdWoiOMK07G3y129+nsNlwNrITo9LoBW X-Received: by 2002:a65:61c8:: with SMTP id j8-v6mr26904201pgv.370.1525878489593; Wed, 09 May 2018 08:08:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525878489; cv=none; d=google.com; s=arc-20160816; b=o69uHN1fIw0Ef+En8PmlMMzu4C4hw2HGR9QCoIQ8TAexPQ+BqLOv1U5Ambz8ydQ8yG EoIU8eb/urDIlpA9mrAJf4ctMGHZl9w352TMRnXwqIErGXAatxSsb+xhT2RjrZsCSbPJ ObReuMfJFU+3Si+UtdDHaHaQVlhitK5gyV4bS2ysJMftlG1BvrnID8yelS8UL2hZrSqV TRGX92OPKwWPWF5JRHFF3RuDbUwE+S+TaGRS3twDXPg00Hb2ObZXJeJWBUBzgY2C64vA F4gdLJBYMB/FN35hgOvvUdiiF6uxrjnWForlozF7QREOWAvK3TNa7NfL6m1UjOFT/giV qA1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=tQS3HK+v8qe/rWm15pJwoCWM9mTf7IljwdZVAkJ46Js=; b=0LAhirTo9ZAQuO9z1rcBjFG1G7XgPyEi/Yb3xi0C5W6TCL4T+iq0JySGc7XtgCaNkE Cqt6kDbzasPG6iijtvXlNOQX2lRGIyi0qMA3jvqiCNL5qwV5q/xLbvVy1nn14a2AA0QN PmfG5EZB5W+quPbHbfrODheYx1sDzFNXp1KvMaTxd72kN1HosrDXoJahONqOlsbAFBRk NABGbGctBjJq1fspgdLHUcWdmSgbXoStJgGkZsyAy65G6NYVNWDSgODPZZYFya/aOBIr B81x1P6yWvNKaulNokIkFwb0dzFzxSRuo3tQo+eI2MQF2NRLluCGy+Dfqpi2zY1jGqsL nPPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=hs63tMyW; 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 m1-v6si6938769pgd.518.2018.05.09.08.07.53; Wed, 09 May 2018 08:08:09 -0700 (PDT) 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=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=hs63tMyW; 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 S935375AbeEIPHT (ORCPT + 99 others); Wed, 9 May 2018 11:07:19 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:39550 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935065AbeEIPHR (ORCPT ); Wed, 9 May 2018 11:07:17 -0400 Received: by mail-pf0-f196.google.com with SMTP id a22so11682562pfn.6 for ; Wed, 09 May 2018 08:07:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tQS3HK+v8qe/rWm15pJwoCWM9mTf7IljwdZVAkJ46Js=; b=hs63tMyW210wSTKKW6ZmIN6T6VeS1WDo22b6yvR2ITBR3j4c3RR3PxSmDhZGwqoAsQ sURN96MyGa3cxPLqzYB+RAxhRsY4U/UhF7R16k7yerGuqU4oZn8rsP2u+VHj7UB95k/u CmqhQVMnA8uEP7J+lNivxG33d2xJjv8tKVThN5Dmbb/rgk1ezKhEYl/wTQTq+FNBLN7V MMfh6MbtKPZGXulW03bJQ/twt7dtwI7+/RJE4DV7FtFe1ajftyRbbW/cd+w2cZMG5eHB 9OZAbLL5tXtKx9nOC6tjr2KKF6R8ylbW+PJrKVgpdztztRr0CYn8dB5MC03MsZHfTWTf anmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tQS3HK+v8qe/rWm15pJwoCWM9mTf7IljwdZVAkJ46Js=; b=BmOIGJ7VhplPS14dhCEsxGkrjl5DFlSOVmlpq1xhZAHJH801hhfgcgCbDo+rbQC+k2 cgs25G0nAbvsV0gjoCDwj0aeNu4R+qAyuDSV/L7rTNbpNzFRGS4Prgrbn0xQT++bLc7t kICPWfKZo9e2ELA15tVKpE6qp+QPUQNcRJV6TiS+lBlwy7dQHo+VizfTFi156MhiL0He AjG5ss+sTJ4Q8gLGN8wSalzYqqhu1o4tlrrOQ4ReWt24OnAcRUAlQqCNcFlkpxDxFAMd vHdrcTmpjhuJq0Pfo2E2ydFvop/jeZ9RY3vTX2kqgSgPlTpU325KjW5S0IqIQDpdWFZ0 +EzQ== X-Gm-Message-State: ALQs6tDKgF3oMZQjQOaiLLrbDDhOyA6yGoRKbpvfie//Fu+caxVr3qGQ VSa05yDxiapa30FZframcW1Jew== X-Received: by 10.98.10.72 with SMTP id s69mr44400916pfi.134.1525878436729; Wed, 09 May 2018 08:07:16 -0700 (PDT) Received: from xeon-e3 (204-195-35-107.wavecable.com. [204.195.35.107]) by smtp.gmail.com with ESMTPSA id h9-v6sm41578928pgs.29.2018.05.09.08.07.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 May 2018 08:07:16 -0700 (PDT) Date: Wed, 9 May 2018 08:07:14 -0700 From: Stephen Hemminger To: Mohammed Gamal Cc: netdev@vger.kernel.org, sthemmin@microsoft.com, haiyangz@microsoft.com, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, vkuznets@redhat.com Subject: Re: [PATCH v2] hv_netvsc: Fix net device attach on older Windows hosts Message-ID: <20180509080714.1c7467b2@xeon-e3> In-Reply-To: <1525853854-8277-1-git-send-email-mgamal@redhat.com> References: <1525853854-8277-1-git-send-email-mgamal@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 9 May 2018 10:17:34 +0200 Mohammed Gamal wrote: > On older windows hosts the net_device instance is returned to > the caller of rndis_filter_device_add() without having the presence > bit set first. This would cause any subsequent calls to network device > operations (e.g. MTU change, channel change) to fail after the device > is detached once, returning -ENODEV. > > Instead of returning the device instabce, we take the exit path where > we call netif_device_attach() > > Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic") > > Signed-off-by: Mohammed Gamal The standard for patch submission is no blank lines between Fixes and Signed-off-by to make it easier for bots. > --- > drivers/net/hyperv/rndis_filter.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c > index 6b127be..e7ca5b5 100644 > --- a/drivers/net/hyperv/rndis_filter.c > +++ b/drivers/net/hyperv/rndis_filter.c > @@ -1288,7 +1288,7 @@ struct netvsc_device *rndis_filter_device_add(struct hv_device *dev, > rndis_device->link_state ? "down" : "up"); > > if (net_device->nvsp_version < NVSP_PROTOCOL_VERSION_5) > - return net_device; > + goto out; > > rndis_filter_query_link_speed(rndis_device, net_device); > Reviewed-by: Stephen Hemminger