提交 c2a978c1 编写于 作者: A Andrew Lunn 提交者: David S. Miller

net: phy: Read EEE abilities when using .features

A PHY driver can use a static integer value to indicate what link mode
features it supports, i.e, its abilities.. This is the old way, but
useful when dynamically determining the devices features does not
work, e.g. support of fibre.

EEE support has been moved into phydev->supported_eee. This needs to
be set otherwise the code assumes EEE is not supported. It is normally
set as part of reading the devices abilities. However if a static
integer value was used, the dynamic reading of the abilities is not
performed. Add a call to genphy_c45_read_eee_abilities() to read the
EEE abilities.

Fixes: 8b68710a ("net: phy: start using genphy_c45_ethtool_get/set_eee()")
Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
Reviewed-by: NOleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0b1dbf88
...@@ -3113,8 +3113,10 @@ static int phy_probe(struct device *dev) ...@@ -3113,8 +3113,10 @@ static int phy_probe(struct device *dev)
* a controller will attach, and may modify one * a controller will attach, and may modify one
* or both of these values * or both of these values
*/ */
if (phydrv->features) if (phydrv->features) {
linkmode_copy(phydev->supported, phydrv->features); linkmode_copy(phydev->supported, phydrv->features);
genphy_c45_read_eee_abilities(phydev);
}
else if (phydrv->get_features) else if (phydrv->get_features)
err = phydrv->get_features(phydev); err = phydrv->get_features(phydev);
else if (phydev->is_c45) else if (phydev->is_c45)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册