Message ID | 20241216155830.501596-2-Tarun.Alle@microchip.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Add auto-negotiation support for LAN887x T1 phy | expand |
diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index 0dac08e85304..58be2d534b5c 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -418,11 +418,14 @@ EXPORT_SYMBOL_GPL(genphy_c45_aneg_done); int genphy_c45_read_link(struct phy_device *phydev) { u32 mmd_mask = MDIO_DEVS_PMAPMD; + u16 reg = MDIO_CTRL1; int val, devad; bool link = true; if (phydev->c45_ids.mmds_present & MDIO_DEVS_AN) { - val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_CTRL1); + if (genphy_c45_baset1_able(phydev)) + reg = MDIO_AN_T1_CTRL; + val = phy_read_mmd(phydev, MDIO_MMD_AN, reg); if (val < 0) return val;
Add support for auto-negotiation restart status check for T1 phys. Signed-off-by: Tarun Alle <Tarun.Alle@microchip.com> --- v1 -> v2 - Separated out the fix patch. - Changed the commit message. --- drivers/net/phy/phy-c45.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)