@@ -1005,6 +1005,8 @@ static void stmmac_mac_link_down(struct phylink_config *config,
priv->tx_lpi_enabled = false;
priv->eee_enabled = stmmac_eee_init(priv);
stmmac_set_eee_pls(priv, priv->hw, false);
+ phy_update_eee(priv->dev->phydev, priv->tx_lpi_enabled, priv->eee_enabled,
+ priv->tx_lpi_timer);
if (priv->dma_cap.fpesel)
stmmac_fpe_link_state_handle(priv, false);
@@ -1118,6 +1120,8 @@ static void stmmac_mac_link_up(struct phylink_config *config,
priv->eee_enabled = stmmac_eee_init(priv);
priv->tx_lpi_enabled = priv->eee_enabled;
stmmac_set_eee_pls(priv, priv->hw, true);
+ phy_update_eee(phy, priv->tx_lpi_enabled, priv->eee_enabled,
+ priv->tx_lpi_timer);
}
if (priv->dma_cap.fpesel)
Update the eee_cfg values during link-up/down to ensure that 'ethtool --show-eee <devname>' works correctly. Fixes: fe0d4fd9285e ("net: phy: Keep track of EEE configuration") Cc: <stable@vger.kernel.org> Signed-off-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++++ 1 file changed, 4 insertions(+)