提交 5827b168 编写于 作者: O Oleksij Rempel 提交者: David S. Miller

net: phy: c45: migrate to genphy_c45_write_eee_adv()

Migrate from genphy_config_eee_advert() to genphy_c45_write_eee_adv().

It should work as before except write operation to the EEE adv registers
will be done only if some EEE abilities was detected.

If some driver will have a regression, related driver should provide own
.get_features callback. See micrel.c:ksz9477_get_features() as example.
Signed-off-by: NOleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9b01c885
...@@ -262,7 +262,11 @@ int genphy_c45_an_config_aneg(struct phy_device *phydev) ...@@ -262,7 +262,11 @@ int genphy_c45_an_config_aneg(struct phy_device *phydev)
linkmode_and(phydev->advertising, phydev->advertising, linkmode_and(phydev->advertising, phydev->advertising,
phydev->supported); phydev->supported);
changed = genphy_config_eee_advert(phydev); ret = genphy_c45_write_eee_adv(phydev, phydev->supported_eee);
if (ret < 0)
return ret;
else if (ret)
changed = true;
if (genphy_c45_baset1_able(phydev)) if (genphy_c45_baset1_able(phydev))
return genphy_c45_baset1_an_config_aneg(phydev); return genphy_c45_baset1_an_config_aneg(phydev);
...@@ -968,6 +972,11 @@ int genphy_c45_pma_read_abilities(struct phy_device *phydev) ...@@ -968,6 +972,11 @@ int genphy_c45_pma_read_abilities(struct phy_device *phydev)
} }
} }
/* This is optional functionality. If not supported, we may get an error
* which should be ignored.
*/
genphy_c45_read_eee_abilities(phydev);
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(genphy_c45_pma_read_abilities); EXPORT_SYMBOL_GPL(genphy_c45_pma_read_abilities);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册