]> 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:05:20 +0000 (11:05 +0100)
commit694456462ed63a06adbb0b7f2396a2eb5cc153c0
tree9c91aeb7d26b9238fcf8e7a9bf8b3210602c0e59
parent268625b73e4cf2eb542848478d43a84198bd1b83
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