linux-kernelorg-stable/include
Vladimir Oltean 6c14058edf net: dsa: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set()
New timestamping API was introduced in commit 66f7223039 ("net: add
NDOs for configuring hardware timestamping") from kernel v6.6. It is
time to convert DSA to the new API, so that the ndo_eth_ioctl() path can
be removed completely.

Move the ds->ops->port_hwtstamp_get() and ds->ops->port_hwtstamp_set()
calls from dsa_user_ioctl() to dsa_user_hwtstamp_get() and
dsa_user_hwtstamp_set().

Due to the fact that the underlying ifreq type changes to
kernel_hwtstamp_config, the drivers and the Ocelot switchdev front-end,
all hooked up directly or indirectly, must also be converted all at once.

The conversion also updates the comment from dsa_port_supports_hwtstamp(),
which is no longer true because kernel_hwtstamp_config is kernel memory
and does not need copy_to_user(). I've deliberated whether it is
necessary to also update "err != -EOPNOTSUPP" to a more general "!err",
but all drivers now either return 0 or -EOPNOTSUPP.

The existing logic from the ocelot_ioctl() function, to avoid
configuring timestamping if the PHY supports the operation, is obsoleted
by more advanced core logic in dev_set_hwtstamp_phylib().

This is only a partial preparation for proper PHY timestamping support.
None of these switch driver currently sets up PTP traps for PHY
timestamping, so setting dev->see_all_hwtstamp_requests is not yet
necessary and the conversion is relatively trivial.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # felix, sja1105, mv88e6xxx
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20250508095236.887789-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-05-09 16:34:09 -07:00
..
acpi gcc-15: acpi: sprinkle random '__nonstring' crumbles around 2025-04-20 11:57:54 -07:00
asm-generic
clocksource
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-04-17 12:26:50 -07:00
cxl cxl: Fix devm host device for CXL fwctl initialization 2025-04-18 09:33:04 -07:00
drm Short summary of fixes pull: 2025-04-18 08:38:29 +10:00
dt-bindings
hyperv
keys rxrpc: Add YFS RxGK (GSSAPI) security class 2025-04-14 17:36:41 -07:00
kunit
kvm
linux net: enetc: add initial netc-lib driver to support NTMP 2025-05-08 19:43:51 -07:00
math-emu
media
memory
misc
net net: dsa: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() 2025-05-09 16:34:09 -07:00
pcmcia
ras
rdma
rv
scsi
soc net: dsa: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() 2025-05-09 16:34:09 -07:00
sound ASoC: Fixes for v6.15 2025-05-01 10:22:20 +02:00
target
trace Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-08 08:59:02 -07:00
uapi ethtool: Block setting of symmetric RSS when non-symmetric rx-flow-hash is requested 2025-05-09 16:24:28 -07:00
ufs scsi: ufs: Introduce quirk to extend PA_HIBERN8TIME for UFS devices 2025-04-11 22:13:00 -04:00
vdso
video
xen
Kbuild