From: Romain Baeriswyl <Romain.Baeriswyl@abilis.com>
To: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: "David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Romain Baeriswyl <romainba@abilis.com>
Subject: [RFC] net: stmmac: keep RXC running in LPI mode to avoid system overload
Date: Tue, 8 Oct 2013 17:06:35 +0200 [thread overview]
Message-ID: <1381244795-3922-1-git-send-email-romainba@abilis.com> (raw)
In order to avoid system overload, the clock RXC from the Phy should not be
stopped when in LPI mode.
With the RTL8211E PHY which support EEE mode and with Apple Airport Extreme that
supports it also, the kernel get frozen as soon as some Ethernet transfers are
on-going. System seems to be overloaded with too many interrupts. The 'top'
command reports often around ~80% irq.
By letting the RXC clock running even in LPI mode as proposed below, the issue
seems solved. Is it the right way to proceed?
What is the power impact to not stop RXC in LPI mode?
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index e9eab29..d40d26b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -314,7 +314,8 @@ bool stmmac_eee_init(struct stmmac_priv *priv)
/* MAC core supports the EEE feature. */
if (priv->dma_cap.eee) {
/* Check if the PHY supports EEE */
- if (phy_init_eee(priv->phydev, 1))
+ /* Keeps RXC running in LPI mode to avoid stability issue */
+ if (phy_init_eee(priv->phydev, 0))
goto out;
if (!priv->eee_active) {
@@ -770,7 +771,8 @@ static void stmmac_adjust_link(struct net_device *dev)
/* At this stage, it could be needed to setup the EEE or adjust some
* MAC related HW registers.
*/
- priv->eee_enabled = stmmac_eee_init(priv);
+ if (new_state)
+ priv->eee_enabled = stmmac_eee_init(priv);
spin_unlock_irqrestore(&priv->lock, flags);
}
--
1.7.1
next reply other threads:[~2013-10-08 15:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-08 15:06 Romain Baeriswyl [this message]
2013-10-09 15:28 ` [RFC] net: stmmac: keep RXC running in LPI mode to avoid system overload Giuseppe CAVALLARO
2013-10-13 20:02 ` Romain Baeriswyl
2013-10-16 20:29 ` Giuseppe CAVALLARO
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=1381244795-3922-1-git-send-email-romainba@abilis.com \
--to=romain.baeriswyl@abilis.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=romainba@abilis.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).