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)
committerJakub Kicinski <kuba@kernel.org>
Tue, 10 Jan 2023 23:53:36 +0000 (15:53 -0800)
commitb063b1924fd9bf0bc157cf644764dc2151d04ccc
tree13353456f0dcf24a6d2af0d6dab3be4f5a21b899
parent555d64c6d8e551a149ce29024b9318d3523f2842
net: mdio: C22 is now optional, EOPNOTSUPP if not provided

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>
drivers/net/phy/mdio_bus.c