netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wong Vee Khee <vee.khee.wong@linux.intel.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>,
	Wong Vee Khee <veekhee@gmail.com>
Subject: Re: [PATCH net v1 1/1] net: stmmac: fix EEE init issue when paired with EEE capable PHYs
Date: Tue, 5 Oct 2021 19:15:56 +0800	[thread overview]
Message-ID: <20211005111556.GA28642@linux.intel.com> (raw)
In-Reply-To: <YVZI2GWxUNZdL2SX@lunn.ch>

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

      reply	other threads:[~2021-10-05 11:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 13:20 ` patchwork-bot+netdevbpf
2021-09-30 23:31 ` Andrew Lunn
2021-10-05 11:15   ` Wong Vee Khee [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211005111556.GA28642@linux.intel.com \
    --to=vee.khee.wong@linux.intel.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=joabreu@synopsys.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=michael.wei.hong.sit@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=veekhee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).