Skip to content

Commit

Permalink
ixgbe: Use C45 mdiobus accessors
Browse files Browse the repository at this point in the history
When performing a C45 bus transaction, make use of the c45 variants of
the bus read/write helpers. The ability to pass a special register
value is being removed to clean up the mdio bus driver API.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Andrew Lunn authored and Jakub Kicinski committed Jan 18, 2023
1 parent 308c8ff commit ab2960f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8937,7 +8937,8 @@ ixgbe_mdio_read(struct net_device *netdev, int prtad, int devad, u16 addr)
int regnum = addr;

if (devad != MDIO_DEVAD_NONE)
regnum |= (devad << 16) | MII_ADDR_C45;
return mdiobus_c45_read(adapter->mii_bus, prtad,
devad, regnum);

return mdiobus_read(adapter->mii_bus, prtad, regnum);
}
Expand All @@ -8960,7 +8961,8 @@ static int ixgbe_mdio_write(struct net_device *netdev, int prtad, int devad,
int regnum = addr;

if (devad != MDIO_DEVAD_NONE)
regnum |= (devad << 16) | MII_ADDR_C45;
return mdiobus_c45_write(adapter->mii_bus, prtad, devad,
regnum, value);

return mdiobus_write(adapter->mii_bus, prtad, regnum, value);
}
Expand Down

0 comments on commit ab2960f

Please sign in to comment.