From: Greg KH <gregkh@linuxfoundation.org>
To: Yajun Deng <yajun.deng@linux.dev>
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
Date: Sat, 7 Oct 2023 13:33:17 +0200 [thread overview]
Message-ID: <2023100707-hydrogen-tapestry-62e8@gregkh> (raw)
In-Reply-To: <20230926071059.1239033-1-yajun.deng@linux.dev>
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: <stable@vger.kernel.org> # 6.1
> Cc: Tony Nguyen <anthony.l.nguyen@intel.com>
> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_ptp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Now queued up, thanks.
greg k-h
prev parent reply other threads:[~2023-10-07 11:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-26 7:10 [PATCH RESEND] i40e: fix the wrong PTP frequency calculation Yajun Deng
2023-10-07 11:33 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2023100707-hydrogen-tapestry-62e8@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=anthony.l.nguyen@intel.com \
--cc=jacob.e.keller@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=yajun.deng@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).