From 392107954bd27fbbabcafb20df0aa89020d1a7e0 Mon Sep 17 00:00:00 2001 From: "Daniel P. Carvalho" Date: Sun, 20 Sep 2026 13:58:13 -0300 Subject: [PATCH] arch/arm/stm32: fix the comment of the RX timestamp conversion. The comment of stm32_eth_ptp_convert_rxtime() said that it converts to CLOCK_REALTIME. Since the timestamp is delivered as the value of the PTP counter of the MAC, which is the time base of /dev/ptp0, say that. Signed-off-by: Daniel P. Carvalho Assisted-by: Claude:claude-sonnet-5 --- arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c b/arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c index 56947eb3a2a..d68038d85d1 100644 --- a/arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c +++ b/arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c @@ -3987,7 +3987,10 @@ static inline void ptp_to_timespec(uint64_t timestamp, struct timespec *ts) ts->tv_nsec = ((uint32_t)timestamp * (uint64_t)NSEC_PER_SEC) >> 32; } -/* Convert RX timestamp to CLOCK_REALTIME */ +/* Convert the RX timestamp of the MAC to a timespec. It is the value of the + * PTP counter of the MAC, which is the time base of /dev/ptp0, and not a + * value of CLOCK_REALTIME. + */ #ifdef CONFIG_STM32_ETH_TIMESTAMP_RX static void stm32_eth_ptp_convert_rxtime(struct stm32_ethmac_s *priv) {