mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-14 14:07:33 +07:00
net: phy: fix a bug when verify the EEE support
The phy_init_eee has to exit with an error when the local device and its link partner both do not support EEE. So this patch fixes a problem when verify this. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a622260254
commit
9a9c56cb34
@ -1044,7 +1044,7 @@ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable)
|
|||||||
adv = mmd_eee_adv_to_ethtool_adv_t(eee_adv);
|
adv = mmd_eee_adv_to_ethtool_adv_t(eee_adv);
|
||||||
lp = mmd_eee_adv_to_ethtool_adv_t(eee_lp);
|
lp = mmd_eee_adv_to_ethtool_adv_t(eee_lp);
|
||||||
idx = phy_find_setting(phydev->speed, phydev->duplex);
|
idx = phy_find_setting(phydev->speed, phydev->duplex);
|
||||||
if ((lp & adv & settings[idx].setting))
|
if (!(lp & adv & settings[idx].setting))
|
||||||
goto eee_exit;
|
goto eee_exit;
|
||||||
|
|
||||||
if (clk_stop_enable) {
|
if (clk_stop_enable) {
|
||||||
|
Loading…
Reference in New Issue
Block a user