2021-05-05 00:32:27 +00:00
|
|
|
--- a/drivers/net/phy/phylink.c
|
|
|
|
+++ b/drivers/net/phy/phylink.c
|
2021-12-01 11:28:02 +00:00
|
|
|
@@ -1449,6 +1449,11 @@ int phylink_ethtool_ksettings_set(struct
|
2021-05-05 05:02:49 +00:00
|
|
|
* the presence of a PHY, this should not be changed as that
|
|
|
|
* should be determined from the media side advertisement.
|
|
|
|
*/
|
2021-05-05 00:32:27 +00:00
|
|
|
+ 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);
|
|
|
|
+ }
|
|
|
|
+ }
|
2021-05-05 05:02:49 +00:00
|
|
|
return phy_ethtool_ksettings_set(pl->phydev, kset);
|
|
|
|
}
|
|
|
|
|
2021-12-01 11:28:02 +00:00
|
|
|
@@ -1750,8 +1755,11 @@ int phylink_ethtool_get_eee(struct phyli
|
2021-05-05 00:32:27 +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;
|
|
|
|
}
|
2021-12-01 11:28:02 +00:00
|
|
|
@@ -1768,8 +1776,11 @@ int phylink_ethtool_set_eee(struct phyli
|
2021-05-05 00:32:27 +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);
|
|
|
|
+ }
|
2021-05-05 05:02:49 +00:00
|
|
|
|
2021-05-05 00:32:27 +00:00
|
|
|
return ret;
|
|
|
|
}
|