All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v1 1/1] net: stmmac: fix EEE init issue when paired with EEE capable PHYs
@ 2021-09-30  6:44 ` Wong Vee Khee
  0 siblings, 0 replies; 8+ messages in thread
From: Wong Vee Khee @ 2021-09-30  6:44 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	Michael Sit Wei Hong, 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 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@intel.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.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);
 	}
 
 	if (priv->plat->has_gmac4 && priv->tx_lpi_timer <= STMMAC_ET_MAX) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net v1 1/1] net: stmmac: fix EEE init issue when paired with EEE capable PHYs
@ 2021-09-30  6:44 ` Wong Vee Khee
  0 siblings, 0 replies; 8+ messages in thread
From: Wong Vee Khee @ 2021-09-30  6:44 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	Michael Sit Wei Hong, 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 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@intel.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.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);
 	}
 
 	if (priv->plat->has_gmac4 && priv->tx_lpi_timer <= STMMAC_ET_MAX) {
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH net v1 1/1] net: stmmac: fix EEE init issue when paired with EEE capable PHYs
  2021-09-30  6:44 ` Wong Vee Khee
@ 2021-09-30 13:20   ` patchwork-bot+netdevbpf
  -1 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-09-30 13:20 UTC (permalink / raw)
  To: Wong Vee Khee
  Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem, kuba,
	mcoquelin.stm32, netdev, linux-stm32, linux-arm-kernel,
	linux-kernel, michael.wei.hong.sit, veekhee

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

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 in stmmac_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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net v1 1/1] net: stmmac: fix EEE init issue when paired with EEE capable PHYs
@ 2021-09-30 13:20   ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-09-30 13:20 UTC (permalink / raw)
  To: Wong Vee Khee
  Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem, kuba,
	mcoquelin.stm32, netdev, linux-stm32, linux-arm-kernel,
	linux-kernel, michael.wei.hong.sit, veekhee

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

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 in stmmac_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



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net v1 1/1] net: stmmac: fix EEE init issue when paired with EEE capable PHYs
  2021-09-30  6:44 ` Wong Vee Khee
@ 2021-09-30 23:31   ` Andrew Lunn
  -1 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2021-09-30 23:31 UTC (permalink / raw)
  To: Wong Vee Khee
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel,
	Michael Sit Wei Hong, Wong Vee Khee

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@intel.com>
> Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net v1 1/1] net: stmmac: fix EEE init issue when paired with EEE capable PHYs
@ 2021-09-30 23:31   ` Andrew Lunn
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2021-09-30 23:31 UTC (permalink / raw)
  To: Wong Vee Khee
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel,
	Michael Sit Wei Hong, Wong Vee Khee

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@intel.com>
> Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net v1 1/1] net: stmmac: fix EEE init issue when paired with EEE capable PHYs
  2021-09-30 23:31   ` Andrew Lunn
@ 2021-10-05 11:15     ` Wong Vee Khee
  -1 siblings, 0 replies; 8+ messages in thread
From: Wong Vee Khee @ 2021-10-05 11:15 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel,
	Michael Sit Wei Hong, Wong Vee Khee

On Fri, Oct 01, 2021 at 01:31:36AM +0200, Andrew Lunn wrote:
> 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@intel.com>
> > Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.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

You're right.

Will introduce a new patch for that.

Regards,
Vee Khee

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net v1 1/1] net: stmmac: fix EEE init issue when paired with EEE capable PHYs
@ 2021-10-05 11:15     ` Wong Vee Khee
  0 siblings, 0 replies; 8+ messages in thread
From: Wong Vee Khee @ 2021-10-05 11:15 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel,
	Michael Sit Wei Hong, Wong Vee Khee

On Fri, Oct 01, 2021 at 01:31:36AM +0200, Andrew Lunn wrote:
> 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@intel.com>
> > Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.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

You're right.

Will introduce a new patch for that.

Regards,
Vee Khee

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-10-05 11:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30  6:44 [PATCH net v1 1/1] net: stmmac: fix EEE init issue when paired with EEE capable PHYs Wong Vee Khee
2021-09-30  6:44 ` Wong Vee Khee
2021-09-30 13:20 ` patchwork-bot+netdevbpf
2021-09-30 13:20   ` patchwork-bot+netdevbpf
2021-09-30 23:31 ` Andrew Lunn
2021-09-30 23:31   ` Andrew Lunn
2021-10-05 11:15   ` Wong Vee Khee
2021-10-05 11:15     ` Wong Vee Khee

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.