lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <CACRpkdY58DH9O5g35Ai5PjE2gDSSbF1GodDNj94-xhPKfHURkw@mail.gmail.com> Date: Mon, 12 May 2025 14:29:18 +0200 From: Linus Walleij <linus.walleij@...aro.org> To: Vladimir Oltean <vladimir.oltean@....com> Cc: netdev@...r.kernel.org, Köry Maincent <kory.maincent@...tlin.com>, Linus Walleij <linusw@...nel.org>, Imre Kaloz <kaloz@...nwrt.org>, linux-arm-kernel@...ts.infradead.org, Andrew Lunn <andrew@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Richard Cochran <richardcochran@...il.com>, linux-kernel@...r.kernel.org Subject: Re: [PATCH net-next] net: ixp4xx_eth: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() On Thu, May 8, 2025 at 11:12 PM Vladimir Oltean <vladimir.oltean@....com> wrote: > 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 <vladimir.oltean@....com> Overall looks good to me: Reviewed-by: Linus Walleij <linus.walleij@...aro.org> Yours, Linus Walleij
Powered by blists - more mailing lists