* [PATCH net] stmmac: reset last TSO segment size after device open
@ 2017-12-01 10:12 Lars Persson
2017-12-03 14:48 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Lars Persson @ 2017-12-01 10:12 UTC (permalink / raw)
To: peppe.cavallaro, alexandre.torgue, netdev; +Cc: Lars Persson
The mss variable tracks the last max segment size sent to the TSO
engine. We do not update the hardware as long as we receive skb:s with
the same value in gso_size.
During a network device down/up cycle (mapped to stmmac_release() and
stmmac_open() callbacks) we issue a reset to the hardware and it
forgets the setting for mss. However we did not zero out our mss
variable so the next transmission of a gso packet happens with an
undefined hardware setting.
This triggers a hang in the TSO engine and eventuelly the netdev
watchdog will bark.
Fixes: f748be531d70 ("stmmac: support new GMAC4")
Signed-off-by: Lars Persson <larper@axis.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index f63c2ddced3c..d7250539d0bd 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2588,6 +2588,7 @@ static int stmmac_open(struct net_device *dev)
priv->dma_buf_sz = STMMAC_ALIGN(buf_sz);
priv->rx_copybreak = STMMAC_RX_COPYBREAK;
+ priv->mss = 0;
ret = alloc_dma_desc_resources(priv);
if (ret < 0) {
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] stmmac: reset last TSO segment size after device open
2017-12-01 10:12 [PATCH net] stmmac: reset last TSO segment size after device open Lars Persson
@ 2017-12-03 14:48 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-12-03 14:48 UTC (permalink / raw)
To: lars.persson; +Cc: peppe.cavallaro, alexandre.torgue, netdev, larper
From: Lars Persson <lars.persson@axis.com>
Date: Fri, 1 Dec 2017 11:12:44 +0100
> The mss variable tracks the last max segment size sent to the TSO
> engine. We do not update the hardware as long as we receive skb:s with
> the same value in gso_size.
>
> During a network device down/up cycle (mapped to stmmac_release() and
> stmmac_open() callbacks) we issue a reset to the hardware and it
> forgets the setting for mss. However we did not zero out our mss
> variable so the next transmission of a gso packet happens with an
> undefined hardware setting.
>
> This triggers a hang in the TSO engine and eventuelly the netdev
> watchdog will bark.
>
> Fixes: f748be531d70 ("stmmac: support new GMAC4")
> Signed-off-by: Lars Persson <larper@axis.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-03 14:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-01 10:12 [PATCH net] stmmac: reset last TSO segment size after device open Lars Persson
2017-12-03 14:48 ` David Miller
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.