mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
stmmac: reset last TSO segment size after device open
[ Upstream commit45ab4b13e4] 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:f748be531d("stmmac: support new GMAC4") Signed-off-by: Lars Persson <larper@axis.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
564fe3e0e9
commit
30985e3beb
@@ -1795,6 +1795,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) {
|
||||
|
||||
Reference in New Issue
Block a user