[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YVZI2GWxUNZdL2SX@lunn.ch>
Date: Fri, 1 Oct 2021 01:31:36 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Wong Vee Khee <vee.khee.wong@...ux.intel.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Michael Sit Wei Hong <michael.wei.hong.sit@...el.com>,
Wong Vee Khee <veekhee@...il.com>
Subject: Re: [PATCH net v1 1/1] net: stmmac: fix EEE init issue when paired
with EEE capable PHYs
On Thu, Sep 30, 2021 at 02:44:36PM +0800, Wong Vee Khee 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 in stmmac_eee_init().
>
> Fixes: 7617af3d1a5e ("net: pcs: Introducing support for DWC xpcs Energy Efficient Ethernet")
> Cc: Michael Sit Wei Hong <michael.wei.hong.sit@...el.com>
> Signed-off-by: Wong Vee Khee <vee.khee.wong@...ux.intel.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 553c4403258a..981ccf47dcea 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -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
Powered by blists - more mailing lists