Skip to content

Commit e5133f2

Browse files
jbrun3tdavem330
authored andcommitted
Revert "net: stmmac: Do not keep rearming the coalesce timer in stmmac_xmit"
This reverts commit 4ae0169. 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 <[email protected]> Cc: Joao Pinto <[email protected]> Cc: Vitor Soares <[email protected]> Cc: Giuseppe Cavallaro <[email protected]> Cc: Alexandre Torgue <[email protected]> Cc: Corentin Labbe <[email protected]> Signed-off-by: Jerome Brunet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bd583fe commit e5133f2

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

drivers/net/ethernet/stmicro/stmmac/stmmac.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ struct stmmac_priv {
112112
u32 tx_count_frames;
113113
u32 tx_coal_frames;
114114
u32 tx_coal_timer;
115-
bool tx_timer_armed;
116115

117116
int tx_coalesce;
118117
int hwts_tx_en;

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3147,16 +3147,13 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
31473147
* element in case of no SG.
31483148
*/
31493149
priv->tx_count_frames += nfrags + 1;
3150-
if (likely(priv->tx_coal_frames > priv->tx_count_frames) &&
3151-
!priv->tx_timer_armed) {
3150+
if (likely(priv->tx_coal_frames > priv->tx_count_frames)) {
31523151
mod_timer(&priv->txtimer,
31533152
STMMAC_COAL_TIMER(priv->tx_coal_timer));
3154-
priv->tx_timer_armed = true;
31553153
} else {
31563154
priv->tx_count_frames = 0;
31573155
stmmac_set_tx_ic(priv, desc);
31583156
priv->xstats.tx_set_ic_bit++;
3159-
priv->tx_timer_armed = false;
31603157
}
31613158

31623159
skb_tx_timestamp(skb);

0 commit comments

Comments
 (0)