]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: mdio: Add dedicated C45 API to MDIO bus drivers
authorAndrew Lunn <andrew@lunn.ch>
Mon, 9 Jan 2023 15:30:41 +0000 (16:30 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 10 Jan 2023 23:53:33 +0000 (15:53 -0800)
commit4e4aafcddbbfcdd6eed5780e190fcbfac8b4685a
tree8153e32b3863a9b490e2a6f7669dadcf262c77de
parent96b7a9d11a92cc0b09fd645657462a9d9558ef5f
net: mdio: Add dedicated C45 API to MDIO bus drivers

Currently C22 and C45 transactions are mixed over a combined API calls
which make use of a special bit in the reg address to indicate if a
C45 transaction should be performed. This makes it impossible to know
if the bus driver actually supports C45. Additionally, many C22 only
drivers don't return -EOPNOTSUPP when asked to perform a C45
transaction, they mistaking perform a C22 transaction.

This is the first step to cleanly separate C22 from C45. To maintain
backwards compatibility until all drivers which are capable of
performing C45 are converted to this new API, the helper functions
will fall back to the older API if the new API is not
supported. Eventually this fallback will be removed.

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
include/linux/mdio.h
include/linux/phy.h