Received: by 10.213.65.68 with SMTP id h4csp2286091imn; Thu, 5 Apr 2018 12:12:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx48rM1Wxff9tbjaJgHNMnRqey7UcamThpYln6M9xgycOqcD5Q4O9k9oFY2002Z5QPCG2UBjD X-Received: by 2002:a17:902:244:: with SMTP id 62-v6mr15366049plc.125.1522955530629; Thu, 05 Apr 2018 12:12:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522955530; cv=none; d=google.com; s=arc-20160816; b=DIX2ojHmALn6JWvjTCpAZf81TcroVun/mn+HuABJ7Qj3VOoMLqzU5Z+S63Rmak5OmS UP6qR8+b9YYYCjKo0EVhx/JQ+eMoy2XuQwzCY1uFsgahe4vFAVCzSTveQe13CFbfCbdE LiWI7UnpQhtIKBueKymOl5X1G451JP4GQ8RK3FMPLJybdk+8uMZ14c9VbhO5V6cfuheT nsSB9VOXeslVsm5r3OU1oEaKfBiHjj5BqJXm/UoIDKc3KJk94qrpteuYhuGAoAAkJMRg n3ERkO4nUxWNKSjtNOmLT7B+MvkIRtGumTXETI2brZYnrVpq3/J4c0DYOsHTVZ/hbNT9 gr2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=rmV5tRiv0VWN7+A7xCSqbP3LIfmRsMmDrZ5OjkvGXSs=; b=eiYZNZwn4LxKFRGH89UD4Ryqj2qI4JIFtutCcT2Y7mbZti52Am5M4/9aDmJ3rmuSP+ 0xcHpKZKonkQj3QQZBsGJgxOIt3Dt1MC61d+tYJK82Zl6umz60A25kDRyKUSsDfHZx+H 8jOhMoaNaD5n9yWBD3Pt1gZqcuc7M1TG0Tu9jwGe/0zNIYjhUL/3l/iMg9mG/9d/o8p0 KnShEz/l43Ls2mC0cPV56D/IltUb41gB5/nDkZuIBQP7Nov9w1qifGFgwIhPLQW+SiVQ bTr9QZk9CzuuCO7nUuW+YLi8r5VjhyQn9TllaUWHbTZBcrPLtxPZU7SBL+kA9Zoj9uVk AzPg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p29si5887229pgd.392.2018.04.05.12.11.55; Thu, 05 Apr 2018 12:12:10 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752572AbeDETJf (ORCPT + 99 others); Thu, 5 Apr 2018 15:09:35 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:37838 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752383AbeDETJc (ORCPT ); Thu, 5 Apr 2018 15:09:32 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 033454068059; Thu, 5 Apr 2018 19:09:32 +0000 (UTC) Received: from mmorsy.remote.csb (unknown [10.36.112.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id AED502023235; Thu, 5 Apr 2018 19:09:29 +0000 (UTC) From: Mohammed Gamal To: netdev@vger.kernel.org, sthemmin@microsoft.com Cc: devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, kys@microsoft.com, haiyangz@microsoft.com, vkuznets@redhat.com, otubo@redhat.com, Mohammed Gamal Subject: [PATCH 1/4] hv_netvsc: Use Windows version instead of NVSP version on GPAD teardown Date: Thu, 5 Apr 2018 21:09:18 +0200 Message-Id: <1522955361-14704-2-git-send-email-mgamal@redhat.com> In-Reply-To: <1522955361-14704-1-git-send-email-mgamal@redhat.com> References: <1522955361-14704-1-git-send-email-mgamal@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 05 Apr 2018 19:09:32 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 05 Apr 2018 19:09:32 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mgamal@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When changing network interface settings, Windows guests older than WS2016 can no longer shutdown. This was addressed by commit 0ef58b0a05c12 ("hv_netvsc: change GPAD teardown order on older versions"), however the issue also occurs on WS2012 guests that share NVSP protocol versions with WS2016 guests. Hence we use Windows version directly to differentiate them. Fixes: 0ef58b0a05c12 ("hv_netvsc: change GPAD teardown order on older versions") Signed-off-by: Mohammed Gamal --- drivers/net/hyperv/netvsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index c9910c3..d65b7fc 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c @@ -590,13 +590,13 @@ void netvsc_device_remove(struct hv_device *device) netdev_dbg(ndev, "net device safe to remove\n"); /* older versions require that buffer be revoked before close */ - if (net_device->nvsp_version < NVSP_PROTOCOL_VERSION_4) + if (vmbus_proto_version < VERSION_WIN10) netvsc_teardown_gpadl(device, net_device); /* Now, we can close the channel safely */ vmbus_close(device->channel); - if (net_device->nvsp_version >= NVSP_PROTOCOL_VERSION_4) + if (vmbus_proto_version >= VERSION_WIN10) netvsc_teardown_gpadl(device, net_device); /* Release all resources */ -- 1.8.3.1