diff options
| author | Vladimir Oltean <[email protected]> | 2025-05-08 21:10:42 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-05-13 01:10:24 +0000 |
| commit | c14e1ecefd9e706262ac713fd27530e3344ef85c (patch) | |
| tree | f18c1eef2ab1d502b43426deff1ea7c035170c8d /drivers/net/ethernet/intel/igc/igc_main.c | |
| parent | selftests: drv-net: ping: make sure the ping test restores checksum offload (diff) | |
| download | kernel-c14e1ecefd9e706262ac713fd27530e3344ef85c.tar.gz kernel-c14e1ecefd9e706262ac713fd27530e3344ef85c.zip | |
net: ixp4xx_eth: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set()
New timestamping API was introduced in commit 66f7223039c0 ("net: add
NDOs for configuring hardware timestamping") from kernel v6.6. It is
time to convert the intel ixp4xx ethernet driver to the new API, so that
the ndo_eth_ioctl() path can be removed completely.
hwtstamp_get() and hwtstamp_set() are only called if netif_running()
when the code path is engaged through the legacy ioctl. As I don't
want to make an unnecessary functional change which I can't test,
preserve that restriction when going through the new operations.
When cpu_is_ixp46x() is false, the execution of SIOCGHWTSTAMP and
SIOCSHWTSTAMP falls through to phy_mii_ioctl(), which may process it in
case of a timestamping PHY, or may return -EOPNOTSUPP. In the new API,
the core handles timestamping PHYs directly and does not call the netdev
driver, so just return -EOPNOTSUPP directly for equivalent logic.
A gratuitous change I chose to do anyway is prefixing hwtstamp_get() and
hwtstamp_set() with the driver name, ipx4xx. This reflects modern coding
sensibilities, and we are touching the involved lines anyway.
The remainder of eth_ioctl() is exactly equivalent to
phy_do_ioctl_running(), so use that.
Signed-off-by: Vladimir Oltean <[email protected]>
Reviewed-by: Vadim Fedorenko <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc_main.c')
0 files changed, 0 insertions, 0 deletions
