]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: mdio: C22 is now optional, EOPNOTSUPP if not provided
authorAndrew Lunn <andrew@lunn.ch>
Mon, 9 Jan 2023 15:30:44 +0000 (16:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:23 +0000 (11:07 +0100)
commite809a683c5daca37e39b408d4393b188a1915d85
tree74b8b1558c7d4a8a2b10837d13288dff6b97a66a
parent429ab911e2af2b49c6f1359363a5c8d888baeb8d
net: mdio: C22 is now optional, EOPNOTSUPP if not provided

[ Upstream commit b063b1924fd9bf0bc157cf644764dc2151d04ccc ]

When performing a C22 operation, check that the bus driver actually
provides the methods, and return -EOPNOTSUPP if not. C45 only busses
do exist, and in future their C22 methods will be NULL.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 0e629694126c ("net/mdiobus: Fix potential out-of-bounds read/write access")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/mdio_bus.c