From: Daniel Machon <daniel.machon@microchip.com>
To: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Cc: Richard Cochran <richardcochran@gmail.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, <netdev@vger.kernel.org>
Subject: Re: [PATCH net] ptp: ocp: fix PCIe delay estimation calculation
Date: Thu, 8 Oct 2026 12:35:57 +0200 [thread overview]
Message-ID: <20261008103557.mkws3svbpiijwnko@DEN-DL-M70577.microsemi.net> (raw)
In-Reply-To: <20261007203359.417270-1-vadim.fedorenko@linux.dev>
> The commit in fixes introduced a high cap for delayas U64_MAX value
nit: I think delayas should be "delay as", probably not worth respining for.
> while ktime_t is actually s64. This is wrong cap as it becomes negative
> value and any comparison to a real delay will fail to update delay
> value. Use KTIME_MAX constant as correct max cap for PCIe delay.
>
> Fixes: aa05fe67bcd64 ("ptp: ocp: Improve PCIe delay estimation")
> Signed-off-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
> ---
> drivers/ptp/ptp_ocp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
> index 3d26ec1f7b9e..a8cba2f64b98 100644
> --- a/drivers/ptp/ptp_ocp.c
> +++ b/drivers/ptp/ptp_ocp.c
> @@ -1825,7 +1825,7 @@ ptp_ocp_watchdog(struct timer_list *t)
> static void
> ptp_ocp_estimate_pci_timing(struct ptp_ocp *bp)
> {
> - ktime_t start, end, delay = U64_MAX;
> + ktime_t start, end, delay = KTIME_MAX;
> u32 ctrl;
> int i;
>
> --
> 2.47.3
>
>
Reviewed-by: Daniel Machon <daniel.machon@microchip.com>
next prev parent reply other threads:[~2026-10-08 10:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 20:33 [PATCH net] ptp: ocp: fix PCIe delay estimation calculation Vadim Fedorenko
2026-10-07 20:44 ` netdev-bot+sinfo
2026-10-07 21:25 ` Vadim Fedorenko
2026-10-08 10:35 ` Daniel Machon [this message]
2026-10-08 18:40 ` patchwork-bot+netdevbpf
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=20261008103557.mkws3svbpiijwnko@DEN-DL-M70577.microsemi.net \
--to=daniel.machon@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=vadim.fedorenko@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