]> git.ipfire.org Git - thirdparty/linux.git/commit
net: ethtool: relax ethnl_req_get_phydev() locking assertion
authorJakub Kicinski <kuba@kernel.org>
Fri, 5 Jun 2026 00:29:02 +0000 (17:29 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 9 Jun 2026 17:13:04 +0000 (10:13 -0700)
commitded86da4bbb78cad74cecc368fee3ae3a296e2ca
tree5881ec9b5c0f2a3b4adc1705f6562877a7a1f1b7
parent8845484367dade6811bbc3c0c1d66a2a0721c3c0
net: ethtool: relax ethnl_req_get_phydev() locking assertion

phydev <> netdev linking and lifecycle depends on rtnl_lock.
We want to switch to instance locks for most ethtool ops.
Let's add an assert that ops locked devices don't use phydev
today. If one does we can either opt the phy ops out of
being purely ops locked, or do deeper surgery to make phy
locking ops-compatible. I don't think there's any fundamental
challenge to make that work.

Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20260605002912.3456868-3-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phy_link_topology.c
include/linux/phy_link_topology.h
net/ethtool/netlink.c
net/ethtool/netlink.h
net/ethtool/phy.c