diff options
author | 2023-01-17 00:52:21 +0100 | |
---|---|---|
committer | 2023-01-17 19:34:08 -0800 | |
commit | ab2960f0fdfe7db4daaff1d7b34e860cb46a5755 (patch) | |
tree | f74f7fb242f656f622f78ec64458ba9ba5d23648 /drivers/net/ethernet/intel/ixgbe | |
parent | ixgbe: Separate C22 and C45 transactions (diff) | |
download | linux-ab2960f0fdfe7db4daaff1d7b34e860cb46a5755.tar.gz linux-ab2960f0fdfe7db4daaff1d7b34e860cb46a5755.tar.bz2 linux-ab2960f0fdfe7db4daaff1d7b34e860cb46a5755.zip |
ixgbe: Use C45 mdiobus accessors
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>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 93699d2ae051..43a44c1e1576 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -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); } @@ -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); } |