Message ID | E1mxqBm-00GWxu-8y@rmk-PC.armlinux.org.uk (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: axienet: modernise pcs implementation | expand |
On Thu, 16 Dec 2021 12:48:50 +0000 Russell King (Oracle) wrote: > Commit 197a68ef1837 ("net: mdio: Add helper functions for accessing > MDIO devices") added support for mdiodev accessor operations that Nit: wrong commit id, 0ebecb2644c8 ("net: mdio: Add helper functions for accessing MDIO devices")?
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 5edc8ec72317..ac23d1c65ac8 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -1543,8 +1543,7 @@ static int axienet_pcs_config(struct phylink_pcs *pcs, unsigned int mode, if (!lp->switch_x_sgmii) return 0; - ret = mdiobus_write(pcs_phy->bus, pcs_phy->addr, - XLNX_MII_STD_SELECT_REG, + ret = mdiodev_write(pcs_phy, XLNX_MII_STD_SELECT_REG, interface == PHY_INTERFACE_MODE_SGMII ? XLNX_MII_STD_SELECT_SGMII : 0); if (ret < 0) {
Commit 197a68ef1837 ("net: mdio: Add helper functions for accessing MDIO devices") added support for mdiodev accessor operations that neatly wrap the mdiobus accessor operations. Since we are dealing with a mdio device here, update the driver to use mdiodev_write(). Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> --- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)