Thread (5 messages) 5 messages, 4 authors, 29d ago

Re: [PATCH net] net: stmmac: report phc_index as -1 when no PTP clock is registered

flat view

From: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Date: 2026-09-13 00:35:26
Also in: linux-arm-kernel

On Sat, 12 Sep, 2026 23:39:02 +0200 Maxime Chevallier [off-list ref] wrote:
Hi Lorenzo,

On 9/12/26 23:16, Lorenzo Bianconi wrote:
quoted
When hardware timestamping is supported but no PTP clock has been
registered yet (e.g. while the interface is down), stmmac_get_ts_info()
currently reports phc_index as 0. Zero is a valid PHC index and would
make userspace resolve the wrong clock; the absence of a clock should
be reported as -1, matching ethtool_init_tsinfo() and
ethtool_op_get_ts_info().

Report -1 when no PTP clock is available.

Fixes: 9364fa7fcf12 ("net: stmmac: Remove setting of RX software timestamp")
Signed-off-by: Lorenzo Bianconi <redacted>
Ah nice, I've briefly saw that just yesterday but haven't started digging,
thanks for fixing this :)

Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Thanks for the change. Good catch.

Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Maxime
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help