Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756076AbcK2Iir (ORCPT ); Tue, 29 Nov 2016 03:38:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46260 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755316AbcK2Iik (ORCPT ); Tue, 29 Nov 2016 03:38:40 -0500 From: Vitaly Kuznetsov To: "Alex Ng \(LIS\)" Cc: "devel\@linuxdriverproject.org" , "linux-kernel\@vger.kernel.org" , "KY Srinivasan" , Haiyang Zhang Subject: Re: [PATCH] hv: utils: properly pick TS protocol version for future hosts References: <20161128163027.12117-1-vkuznets@redhat.com> Date: Tue, 29 Nov 2016 09:38:37 +0100 In-Reply-To: (Alex Ng's message of "Mon, 28 Nov 2016 18:16:49 +0000") Message-ID: <878ts2fzoy.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 29 Nov 2016 08:38:39 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2419 Lines: 69 "Alex Ng (LIS)" writes: >> -----Original Message----- >> From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com] >> Sent: Monday, November 28, 2016 8:30 AM >> To: devel@linuxdriverproject.org >> Cc: linux-kernel@vger.kernel.org; KY Srinivasan ; >> Haiyang Zhang ; Alex Ng (LIS) >> >> Subject: [PATCH] hv: utils: properly pick TS protocol version for future hosts >> >> It is reasonable to expect that future Hyper-V versions will continue >> supporting TimeSync v4 protocol, we, however, only pick it for >> VERSION_WIN10. Currently this is not an issue as VERSION_WIN10 is the >> maximum protocol version we can negotiate but this may change in future. >> Instead of hoping that we won't forget to update it when time comes I >> suggest we change the default now. >> > > Vitaly, can you see if this upstream commit already fixes the issue you described? > > https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/drivers/hv?id=3da0401b4d0e17aea7526db0235d98fa535d903e > Yes, thanks, missied it! >> Signed-off-by: Vitaly Kuznetsov >> --- >> drivers/hv/hv_util.c | 13 +++++-------- >> 1 file changed, 5 insertions(+), 8 deletions(-) >> >> diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c >> index bcd0630..a13003f 100644 >> --- a/drivers/hv/hv_util.c >> +++ b/drivers/hv/hv_util.c >> @@ -382,23 +382,20 @@ static int util_probe(struct hv_device *dev, >> * Based on the host; initialize the framework and >> * service version numbers we will negotiate. >> */ >> - switch (vmbus_proto_version) { >> - case (VERSION_WS2008): >> + if (vmbus_proto_version <= VERSION_WS2008) { >> util_fw_version = UTIL_WS2K8_FW_VERSION; >> sd_srv_version = SD_VERSION_1; >> ts_srv_version = TS_VERSION_1; >> hb_srv_version = HB_VERSION_1; >> - break; >> - case(VERSION_WIN10): >> + } else if (vmbus_proto_version < VERSION_WIN10) { >> util_fw_version = UTIL_FW_VERSION; >> sd_srv_version = SD_VERSION; >> - ts_srv_version = TS_VERSION; >> + ts_srv_version = TS_VERSION_3; >> hb_srv_version = HB_VERSION; >> - break; >> - default: >> + } else { >> util_fw_version = UTIL_FW_VERSION; >> sd_srv_version = SD_VERSION; >> - ts_srv_version = TS_VERSION_3; >> + ts_srv_version = TS_VERSION; >> hb_srv_version = HB_VERSION; >> } >> >> -- >> 2.9.3 -- Vitaly