net: stmmac: fix EEE init issue when paired with EEE capable PHYs
Subsystems (4)
PATCH 1/1 net: stmmac: fix EEE init issue when paired with EEE capable PHYs
When STMMAC is paired with Energy-Efficient Ethernet(EEE) capable PHY, and the PHY is advertising EEE by default, we need to enable EEE on the xPCS side too, instead of having user to manually trigger the enabling config via ethtool.
Fixed this by adding xpcs_config_eee() call in stmmac_eee_init().
--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +4 -0
@@ -486,6 +486,10 @@ bool stmmac_eee_init(struct stmmac_priv *priv)timer_setup (&priv->eee_ctrl_timer, stmmac_eee_ctrl_timer,0 );stmmac_set_eee_timer (priv, priv->hw,STMMAC_DEFAULT_LIT_LS , eee_tw_timer); +if (priv->hw->xpcs) +xpcs_config_eee (priv->hw->xpcs, + priv->plat->mult_fact_100ns, + true); }if (priv->plat->has_gmac4 && priv->tx_lpi_timer <=STMMAC_ET_MAX ) {
Signature · 1 line
2.25.1
This patch was applied to netdev/net.git (refs/heads/master):
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
Quoted 8 lines · On Thu, 30 Sep 2021 14:44:36 +0800 you wrote:
When STMMAC is paired with Energy-Efficient Ethernet(EEE) capable PHY, and the PHY is advertising EEE by default, we need to enable EEE on the xPCS side too, instead of having user to manually trigger the enabling config via ethtool.
Fixed this by adding
xpcs_config_eee()call instmmac_eee_init().[...]
Here is the summary with links:
- [net,v1,1/1] net: stmmac: fix EEE init issue when paired with EEE capable PHYs
https://git.kernel.org/netdev/net/c/656ed8b015f1
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Quoted 19 lines · Wong Vee Khee
When STMMAC is paired with Energy-Efficient Ethernet(EEE) capable PHY, and the PHY is advertising EEE by default, we need to enable EEE on the xPCS side too, instead of having user to manually trigger the enabling config via ethtool.
Fixed this by adding
xpcs_config_eee()call instmmac_eee_init().Fixes 7617af3d1a5e ("net: pcs: Introducing support for DWC xpcs Energy Efficient Ethernet")Cc Michael Sit Wei Hong <[email protected]>Signed-off-by Wong Vee Khee <[email protected]>--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +0
-0
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c bool stmmac_eee_init(struct stmmac_priv *priv) · line 493
Quoted 8 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +4
-0@@ -486,6 +486,10 @@ bool stmmac_eee_init(struct stmmac_priv *priv)timer_setup (&priv->eee_ctrl_timer, stmmac_eee_ctrl_timer,0 );stmmac_set_eee_timer (priv, priv->hw,STMMAC_DEFAULT_LIT_LS , eee_tw_timer); +if (priv->hw->xpcs) +xpcs_config_eee (priv->hw->xpcs, + priv->plat->mult_fact_100ns, + true); }
/* Check if it needs to be deactivated */
if (!priv->eee_active) {
if (priv->eee_enabled) {
netdev_dbg(priv->dev, "disable EEE\n");
stmmac_lpi_entry_timer_config(priv, 0);
del_timer_sync(&priv->eee_ctrl_timer);
stmmac_set_eee_timer(priv, priv->hw, 0, eee_tw_timer);
}
mutex_unlock(&priv->lock);
return false;
}Don't you want to turn it of in here?
Andrew
Quoted 42 lines · Andrew Lunn
Quoted 19 lines · Wong Vee Khee
When STMMAC is paired with Energy-Efficient Ethernet(EEE) capable PHY, and the PHY is advertising EEE by default, we need to enable EEE on the xPCS side too, instead of having user to manually trigger the enabling config via ethtool.
Fixed this by adding
xpcs_config_eee()call instmmac_eee_init().Fixes 7617af3d1a5e ("net: pcs: Introducing support for DWC xpcs Energy Efficient Ethernet")Cc Michael Sit Wei Hong <[email protected]>Signed-off-by Wong Vee Khee <[email protected]>--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +0
-0drivers/net/ethernet/stmicro/stmmac/stmmac_main.c bool stmmac_eee_init(struct stmmac_priv *priv) · line 493
Quoted 8 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +4
-0@@ -486,6 +486,10 @@ bool stmmac_eee_init(struct stmmac_priv *priv)timer_setup (&priv->eee_ctrl_timer, stmmac_eee_ctrl_timer,0 );stmmac_set_eee_timer (priv, priv->hw,STMMAC_DEFAULT_LIT_LS , eee_tw_timer); +if (priv->hw->xpcs) +xpcs_config_eee (priv->hw->xpcs, + priv->plat->mult_fact_100ns, + true); }/* Check if it needs to be deactivated */ if (!priv->eee_active) { if (priv->eee_enabled) { netdev_dbg(priv->dev, "disable EEE\n"); stmmac_lpi_entry_timer_config(priv, 0); del_timer_sync(&priv->eee_ctrl_timer); stmmac_set_eee_timer(priv, priv->hw, 0, eee_tw_timer); } mutex_unlock(&priv->lock); return false; }
Quoted 3 lines
Don't you want to turn it of in here?
Andrew
You're right.
Will introduce a new patch for that.
Regards,
Vee Khee