Skip to content

Commit

Permalink
stmmac: reset last TSO segment size after device open
Browse files Browse the repository at this point in the history
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: f748be5 ("stmmac: support new GMAC4")
Signed-off-by: Lars Persson <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
larperaxis authored and davem330 committed Dec 3, 2017
1 parent a98a4eb commit 45ab4b1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 45ab4b1

Please sign in to comment.