]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: stmmac: ptp: conditionally populate getcrosststamp() method
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 3 Sep 2025 14:00:51 +0000 (15:00 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 6 Sep 2025 01:45:14 +0000 (18:45 -0700)
commitbb427fb839de80394f6d2c8a969b8ebf9b100d52
tree4df866bb3774838b7cccf269f410bbe96248c986
parent13a94444fbd66865850533c19c1c9b6fd7a888ae
net: stmmac: ptp: conditionally populate getcrosststamp() method

drivers/char/ptp_chardev.c::ptp_clock_getcaps() uses the presence of
the getcrosststamp() method to indicate to userspace whether
crosststamping is supported or not. Therefore, we should not provide
this method unless it is functional. Only set this method pointer
in stmmac_ptp_register() if the platform glue provides the
necessary functionality.

This does not mean that it will be supported (see intel_crosststamp(),
which is the only implementation that may have support) but at least
we won't be suggesting that it is supported on many platforms where
there is no hope.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1uto2d-00000001se4-0JSY@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c