]> git.itanic.dy.fi Git - linux-stable/commitdiff
net: ngbe: Drop mdiobus_c45_regad()
authorMichael Walle <michael@walle.cc>
Thu, 19 Jan 2023 13:06:58 +0000 (14:06 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 21 Jan 2023 02:12:45 +0000 (18:12 -0800)
With the new C45 MDIO access API, there is no encoding of the register
number anymore and thus the masking isn't necessary anymore. Remove it.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c

index ba33a57b42c212f8d8565341f4314b89d21e3dda..c9ddbbc3fa4f7804c587ce58ae7990f2e8a522ce 100644 (file)
@@ -92,7 +92,7 @@ static int ngbe_phy_read_reg_mdi_c45(struct mii_bus *bus, int phy_addr, int devn
 
        wr32(wx, NGBE_MDIO_CLAUSE_SELECT, 0x0);
        /* setup and write the address cycle command */
-       command = NGBE_MSCA_RA(mdiobus_c45_regad(regnum)) |
+       command = NGBE_MSCA_RA(regnum) |
                  NGBE_MSCA_PA(phy_addr) |
                  NGBE_MSCA_DA(devnum);
        wr32(wx, NGBE_MSCA, command);
@@ -121,7 +121,7 @@ static int ngbe_phy_write_reg_mdi_c45(struct mii_bus *bus, int phy_addr,
 
        wr32(wx, NGBE_MDIO_CLAUSE_SELECT, 0x0);
        /* setup and write the address cycle command */
-       command = NGBE_MSCA_RA(mdiobus_c45_regad(regnum)) |
+       command = NGBE_MSCA_RA(regnum) |
                  NGBE_MSCA_PA(phy_addr) |
                  NGBE_MSCA_DA(devnum);
        wr32(wx, NGBE_MSCA, command);