All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net: stmmac: correctly populate ptp_clock_ops.getcrosststamp
@ 2025-09-03 14:00 Russell King (Oracle)
  2025-09-03 14:00 ` [PATCH net-next 1/2] net: stmmac: ptp: conditionally populate getcrosststamp() method Russell King (Oracle)
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Russell King (Oracle) @ 2025-09-03 14:00 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit, Richard Cochran
  Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, linux-arm-kernel, linux-stm32, Maxime Coquelin,
	netdev, Paolo Abeni

Hi,

While reviewing code in the stmmac PTP driver, I noticed that the
getcrosststamp() method is always populated, irrespective of whether
it is implemented or not by the stmmac platform specific glue layer.

Where a platform specific glue layer does not implement it, the core
stmmac driver code returns -EOPNOTSUPP. However, the PTP clock core
code uses the presence of the method in ptp_clock_ops to determine
whether this facility should be advertised to userspace (see
ptp_clock_getcaps()).

Moreover, the only platform glue that implements this method is the
Intel glue, and for it not to return -EOPNOTSUPP, the CPU has to
support X86_FEATURE_ART.

This series updates the core stmmac code to only provide the
getcrosststamp() method in ptp_clock_ops when the platform glue code
provides an implementation, and then updates the Intel glue code to
only provide its implementation when the CPU has the necessary
X86_FEATURE_ART feature.

As I do not have an Intel card to test with, these changes are
untested, so if anyone has such a card, please test. Thanks.

 drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c |  7 +++----
 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c  | 10 ++++------
 2 files changed, 7 insertions(+), 10 deletions(-)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!


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

end of thread, other threads:[~2025-09-06  2:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-03 14:00 [PATCH net-next 0/2] net: stmmac: correctly populate ptp_clock_ops.getcrosststamp Russell King (Oracle)
2025-09-03 14:00 ` [PATCH net-next 1/2] net: stmmac: ptp: conditionally populate getcrosststamp() method Russell King (Oracle)
2025-09-03 14:00 ` [PATCH net-next 2/2] net: stmmac: intel: only populate plat->crosststamp when supported Russell King (Oracle)
2025-09-03 18:38 ` [PATCH net-next 0/2] net: stmmac: correctly populate ptp_clock_ops.getcrosststamp Simon Horman
2025-09-06  2:00 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.