Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp913779rdb; Sat, 7 Oct 2023 04:33:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHiJx1clFrgGLh3oQWfCN210dLPCb3I3MnEsNQRQ/9J37uJ1uPju6AhR9/Q/2uDPW+t3W7g X-Received: by 2002:aa7:8894:0:b0:68f:edfd:2ac6 with SMTP id z20-20020aa78894000000b0068fedfd2ac6mr12488473pfe.0.1696678425602; Sat, 07 Oct 2023 04:33:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696678425; cv=none; d=google.com; s=arc-20160816; b=ByeE08UiEOc6AXvp+H73Y3MspYccHmizR9y9/Yl5XQFP617WMXdiMyZRPNeWhFn+7Q CNEzG3b83MmU5AI2Kz+BglG5q1PQza23mZGvrOWS5ECDemHVs6OZM4m5E7sqDPaOWflR WoBCUCBPv2AlnBRf4B6k4Wr8joRf7+5xkiIKurGUDb8zwWwFpmfJoGcdCO2ZYTAAVx/Q GTrbeCzcqEKQbD2Q1IISPga9YEYA5FmjutYW1THYY2LIQoGknpoF2Pru22vaq6nbG5tk i7VRW49hnpxWZF0IgES27ZNFHrad/xWxFYFznu169R/RTXnQRz+6qJtG4IbwZkTCXbAc zaJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DwlZpDSJHleba4uFMseW+ekk+NEKeXdUtzfle51vGyw=; fh=AP7+B4VMYTB7zLFZiuWQhTRTpHBGcc1Vdxqt+eXI8a8=; b=K4ewmQ1O2oYZbdaUKHRFa/yHFdagexFVulZ2WSNu/ReXPUKiGzvXy1rRDQeS4H80SQ 2Ji0u5CvozNaU3vG/zfVYd8duKj66tQMjbTrSHCBU6SEbtcJCd7Cux3qdSDz3Zhi2KkK QHaE0pU30WQh3phu5xt4FEtF/6CReLtghRtl2HTln3AGyrE+/A71/XJn3gHv915eeQyG 7DTMMUtmBi+PjZ1tSUTcP3blN4KlUS8qlP3OXq6P6EQRc2a1Q4qSfoNWyQxByJokVeef lYAnU0wOsflfm2l5QcccIsLs7ePE7WRedMXHgQwBlRoyB6zEx0E+7368bH5TnNw8byiA A5pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rDr1R2um; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id g22-20020a056a000b9600b00687427c1ac1si3515027pfj.25.2023.10.07.04.33.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 04:33:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rDr1R2um; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 808E4803C445; Sat, 7 Oct 2023 04:33:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233902AbjJGLdW (ORCPT + 99 others); Sat, 7 Oct 2023 07:33:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233662AbjJGLdV (ORCPT ); Sat, 7 Oct 2023 07:33:21 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73F7CB9; Sat, 7 Oct 2023 04:33:20 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9A7DC433C8; Sat, 7 Oct 2023 11:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696678400; bh=MhC2Xsh1F0Dp/xiGufKa2htr3zYIzm0ooEtftPrfJ5g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rDr1R2umQ5BwJUJxxoc2jFkKlxL2yQU6SkCbIMRVdn4NYYTg8CmJH154fL9154PU2 +ZKCVfl5tqG5SksBNrtI6kwF0uNqyQdfZTSpXm9eEl80y2j2YQUafulniKHjQHtmxf ldQuN/RPF5ZBqHna+Mn9BpEnAE7SFVvcMSO8BCS8= Date: Sat, 7 Oct 2023 13:33:17 +0200 From: Greg KH To: Yajun Deng Cc: jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, jacob.e.keller@intel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH RESEND] i40e: fix the wrong PTP frequency calculation Message-ID: <2023100707-hydrogen-tapestry-62e8@gregkh> References: <20230926071059.1239033-1-yajun.deng@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230926071059.1239033-1-yajun.deng@linux.dev> X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Sat, 07 Oct 2023 04:33:43 -0700 (PDT) X-Spam-Level: ** On Tue, Sep 26, 2023 at 03:10:59PM +0800, Yajun Deng wrote: > The new adjustment should be based on the base frequency, not the > I40E_PTP_40GB_INCVAL in i40e_ptp_adjfine(). > > This issue was introduced in commit 3626a690b717 ("i40e: use > mul_u64_u64_div_u64 for PTP frequency calculation"), frequency is left > just as base I40E_PTP_40GB_INCVAL before the commit. After the commit, > frequency is the I40E_PTP_40GB_INCVAL times the ptp_adj_mult value. > But then the diff is applied on the wrong value, and no multiplication > is done afterwards. > > It was accidentally fixed in commit 1060707e3809 ("ptp: introduce helpers > to adjust by scaled parts per million"). It uses adjust_by_scaled_ppm > correctly performs the calculation and uses the base adjustment, so > there's no error here. But it is a new feature and doesn't need to > backported to the stable releases. > > This issue affects both v6.0 and v6.1, and the v6.1 version is an LTS > release. Therefore, the patch only needs to be applied to v6.1 stable. > > Fixes: 3626a690b717 ("i40e: use mul_u64_u64_div_u64 for PTP frequency calculation") > Cc: # 6.1 > Cc: Tony Nguyen > Signed-off-by: Yajun Deng > Reviewed-by: Jacob Keller > --- > drivers/net/ethernet/intel/i40e/i40e_ptp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Now queued up, thanks. greg k-h