2020-09-13 07:06:13 +00:00
|
|
|
--- a/drivers/net/phy/phylink.c
|
|
|
|
+++ b/drivers/net/phy/phylink.c
|
2020-09-17 13:51:25 +00:00
|
|
|
@@ -1242,6 +1242,11 @@ int phylink_ethtool_ksettings_set(struct
|
2020-09-13 07:06:13 +00:00
|
|
|
|
|
|
|
/* If we have a PHY, configure the phy */
|
|
|
|
if (pl->phydev) {
|
|
|
|
+ if (pl->phydev->drv->get_port && pl->phydev->drv->set_port) {
|
|
|
|
+ if(pl->phydev->drv->get_port(pl->phydev) != kset->base.port) {
|
|
|
|
+ pl->phydev->drv->set_port(pl->phydev, kset->base.port);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
ret = phy_ethtool_ksettings_set(pl->phydev, &our_kset);
|
|
|
|
if (ret)
|
|
|
|
return ret;
|
2020-09-17 13:51:25 +00:00
|
|
|
@@ -1420,8 +1425,11 @@ int phylink_ethtool_get_eee(struct phyli
|
2020-09-13 07:06:13 +00:00
|
|
|
|
|
|
|
ASSERT_RTNL();
|
|
|
|
|
|
|
|
- if (pl->phydev)
|
|
|
|
+ if (pl->phydev) {
|
|
|
|
+ if (pl->phydev->drv->get_eee)
|
|
|
|
+ return pl->phydev->drv->get_eee(pl->phydev, eee);
|
|
|
|
ret = phy_ethtool_get_eee(pl->phydev, eee);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
2020-09-17 13:51:25 +00:00
|
|
|
@@ -1438,9 +1446,11 @@ int phylink_ethtool_set_eee(struct phyli
|
2020-09-13 07:06:13 +00:00
|
|
|
|
|
|
|
ASSERT_RTNL();
|
|
|
|
|
|
|
|
- if (pl->phydev)
|
|
|
|
+ if (pl->phydev) {
|
|
|
|
+ if (pl->phydev->drv->set_eee)
|
|
|
|
+ return pl->phydev->drv->set_eee(pl->phydev, eee);
|
|
|
|
ret = phy_ethtool_set_eee(pl->phydev, eee);
|
|
|
|
-
|
|
|
|
+ }
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL_GPL(phylink_ethtool_set_eee);
|