]> git.baikalelectronics.ru Git - kernel.git/commit
stmmac: reset last TSO segment size after device open
authorLars Persson <lars.persson@axis.com>
Fri, 1 Dec 2017 10:12:44 +0000 (11:12 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 Dec 2017 14:47:42 +0000 (09:47 -0500)
commitbd56b6196ecf49c71b855345e4de91200715e955
tree30cdaa2a0c1e70bdeaa6a67428fbfec9456f33e0
parent9c7508143a5e9a15a625b90662258af6b889c2b0
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.

Fixes: 601960c3588f ("stmmac: support new GMAC4")
Signed-off-by: Lars Persson <larper@axis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c