Commit e5133f2f authored by Jerome Brunet's avatar Jerome Brunet Committed by David S. Miller

Revert "net: stmmac: Do not keep rearming the coalesce timer in stmmac_xmit"

This reverts commit 4ae0169f.

This change in the handling of the coalesce timer is causing regression on
(at least) amlogic platforms.

Network will break down very quickly (a few seconds) after starting
a download. This can easily be reproduced using iperf3 for example.

The problem has been reported on the S805, S905, S912 and A113 SoCs
(Realtek and Micrel PHYs) and it is likely impacting all Amlogics
platforms using Gbit ethernet

No problem was seen with the platform using 10/100 only PHYs (GXL internal)

Reverting change brings things back to normal and allows to use network
again until we better understand the problem with the coalesce timer.

Cc: Jose Abreu <joabreu@synopsys.com>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: Vitor Soares <soares@synopsys.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bd583fe3
...@@ -112,7 +112,6 @@ struct stmmac_priv { ...@@ -112,7 +112,6 @@ struct stmmac_priv {
u32 tx_count_frames; u32 tx_count_frames;
u32 tx_coal_frames; u32 tx_coal_frames;
u32 tx_coal_timer; u32 tx_coal_timer;
bool tx_timer_armed;
int tx_coalesce; int tx_coalesce;
int hwts_tx_en; int hwts_tx_en;
......
...@@ -3147,16 +3147,13 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -3147,16 +3147,13 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
* element in case of no SG. * element in case of no SG.
*/ */
priv->tx_count_frames += nfrags + 1; priv->tx_count_frames += nfrags + 1;
if (likely(priv->tx_coal_frames > priv->tx_count_frames) && if (likely(priv->tx_coal_frames > priv->tx_count_frames)) {
!priv->tx_timer_armed) {
mod_timer(&priv->txtimer, mod_timer(&priv->txtimer,
STMMAC_COAL_TIMER(priv->tx_coal_timer)); STMMAC_COAL_TIMER(priv->tx_coal_timer));
priv->tx_timer_armed = true;
} else { } else {
priv->tx_count_frames = 0; priv->tx_count_frames = 0;
stmmac_set_tx_ic(priv, desc); stmmac_set_tx_ic(priv, desc);
priv->xstats.tx_set_ic_bit++; priv->xstats.tx_set_ic_bit++;
priv->tx_timer_armed = false;
} }
skb_tx_timestamp(skb); skb_tx_timestamp(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment