Netdev List
 help / color / mirror / Atom feed
* [PATCH net] ptp: ocp: fix PCIe delay estimation calculation
@ 2026-10-07 20:33 Vadim Fedorenko
  2026-10-07 20:44 ` netdev-bot+sinfo
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Vadim Fedorenko @ 2026-10-07 20:33 UTC (permalink / raw)
  To: Richard Cochran, Andrew Lunn, David S. Miller, Jakub Kicinski
  Cc: Eric Dumazet, Paolo Abeni, netdev, Vadim Fedorenko

The commit in fixes introduced a high cap for delayas U64_MAX value
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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-08 18:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-10-08 18:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox