stmmac: reset last TSO segment size after device open
Subsystems (4)
PATCH 1/1 stmmac: reset last TSO segment size after device open
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.
--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1 -0
@@ -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 ) {
Signature · 1 line
2.11.0
David Miller
maintainerFrom: Lars Persson <[email protected]>
Date: Fri, 1 Dec 2017 11:12:44 +0100
Quoted 10 lines
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()andstmmac_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.
Quoted 5 lines
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 <[email protected]>
Applied and queued up for -stable, thanks.