Commit db1a63ae authored by Andrew Lunn's avatar Andrew Lunn Committed by Jakub Kicinski

net: phy: Remove fallback to old C45 method

Now that all MDIO bus drivers which support C45 implement the c45
specific ops, remove the fallback to the old method.
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarMichael Walle <michael@walle.cc>
Reviewed-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent bc170f96
...@@ -917,11 +917,6 @@ int __mdiobus_modify_changed(struct mii_bus *bus, int addr, u32 regnum, ...@@ -917,11 +917,6 @@ int __mdiobus_modify_changed(struct mii_bus *bus, int addr, u32 regnum,
} }
EXPORT_SYMBOL_GPL(__mdiobus_modify_changed); EXPORT_SYMBOL_GPL(__mdiobus_modify_changed);
static u32 mdiobus_c45_addr(int devad, u16 regnum)
{
return MII_ADDR_C45 | devad << MII_DEVADDR_C45_SHIFT | regnum;
}
/** /**
* __mdiobus_c45_read - Unlocked version of the mdiobus_c45_read function * __mdiobus_c45_read - Unlocked version of the mdiobus_c45_read function
* @bus: the mii_bus struct * @bus: the mii_bus struct
...@@ -942,7 +937,7 @@ int __mdiobus_c45_read(struct mii_bus *bus, int addr, int devad, u32 regnum) ...@@ -942,7 +937,7 @@ int __mdiobus_c45_read(struct mii_bus *bus, int addr, int devad, u32 regnum)
if (bus->read_c45) if (bus->read_c45)
retval = bus->read_c45(bus, addr, devad, regnum); retval = bus->read_c45(bus, addr, devad, regnum);
else else
retval = bus->read(bus, addr, mdiobus_c45_addr(devad, regnum)); retval = -EOPNOTSUPP;
trace_mdio_access(bus, 1, addr, regnum, retval, retval); trace_mdio_access(bus, 1, addr, regnum, retval, retval);
mdiobus_stats_acct(&bus->stats[addr], true, retval); mdiobus_stats_acct(&bus->stats[addr], true, retval);
...@@ -973,8 +968,7 @@ int __mdiobus_c45_write(struct mii_bus *bus, int addr, int devad, u32 regnum, ...@@ -973,8 +968,7 @@ int __mdiobus_c45_write(struct mii_bus *bus, int addr, int devad, u32 regnum,
if (bus->write_c45) if (bus->write_c45)
err = bus->write_c45(bus, addr, devad, regnum, val); err = bus->write_c45(bus, addr, devad, regnum, val);
else else
err = bus->write(bus, addr, mdiobus_c45_addr(devad, regnum), err = -EOPNOTSUPP;
val);
trace_mdio_access(bus, 0, addr, regnum, val, err); trace_mdio_access(bus, 0, addr, regnum, val, err);
mdiobus_stats_acct(&bus->stats[addr], false, err); mdiobus_stats_acct(&bus->stats[addr], false, err);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment