diff options
author | Andrew Lunn <andrew@lunn.ch> | 2022-04-30 20:30:37 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-05-02 14:21:38 +0300 |
commit | d18af067c98eb187b8d9fe1f4e2e59ba3ad0a1d8 (patch) | |
tree | a17af5d43e6ae3e9d26cda46cb39a71b821daa02 | |
parent | 639e4b93ab68f5f5fc4734c766124ca96c167f14 (diff) | |
download | linux-d18af067c98eb187b8d9fe1f4e2e59ba3ad0a1d8.tar.xz |
net: pcs: pcs-xpcs: Convert to mdiobus_c45_read
Stop using the helpers to construct a special mdio address which
indicates C45. Instead use the C45 accessors, which will call the
busses C45 specific read/write API.
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-rw-r--r-- | drivers/net/pcs/pcs-xpcs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c index 61418d4dc0cd..4cfd05c15aee 100644 --- a/drivers/net/pcs/pcs-xpcs.c +++ b/drivers/net/pcs/pcs-xpcs.c @@ -175,20 +175,18 @@ static bool __xpcs_linkmode_supported(const struct xpcs_compat *compat, int xpcs_read(struct dw_xpcs *xpcs, int dev, u32 reg) { - u32 reg_addr = mdiobus_c45_addr(dev, reg); struct mii_bus *bus = xpcs->mdiodev->bus; int addr = xpcs->mdiodev->addr; - return mdiobus_read(bus, addr, reg_addr); + return mdiobus_c45_read(bus, addr, dev, reg); } int xpcs_write(struct dw_xpcs *xpcs, int dev, u32 reg, u16 val) { - u32 reg_addr = mdiobus_c45_addr(dev, reg); struct mii_bus *bus = xpcs->mdiodev->bus; int addr = xpcs->mdiodev->addr; - return mdiobus_write(bus, addr, reg_addr, val); + return mdiobus_c45_write(bus, addr, dev, reg, val); } static int xpcs_read_vendor(struct dw_xpcs *xpcs, int dev, u32 reg) |