1 From foo@baz Thu Dec 14 11:45:40 CET 2017
2 From: Lars Persson <lars.persson@axis.com>
3 Date: Fri, 1 Dec 2017 11:12:44 +0100
4 Subject: stmmac: reset last TSO segment size after device open
6 From: Lars Persson <lars.persson@axis.com>
9 [ Upstream commit 45ab4b13e46325d00f4acdb365d406e941a15f81 ]
11 The mss variable tracks the last max segment size sent to the TSO
12 engine. We do not update the hardware as long as we receive skb:s with
13 the same value in gso_size.
15 During a network device down/up cycle (mapped to stmmac_release() and
16 stmmac_open() callbacks) we issue a reset to the hardware and it
17 forgets the setting for mss. However we did not zero out our mss
18 variable so the next transmission of a gso packet happens with an
19 undefined hardware setting.
21 This triggers a hang in the TSO engine and eventuelly the netdev
24 Fixes: f748be531d70 ("stmmac: support new GMAC4")
25 Signed-off-by: Lars Persson <larper@axis.com>
26 Signed-off-by: David S. Miller <davem@davemloft.net>
27 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 +
30 1 file changed, 1 insertion(+)
32 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
33 +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
34 @@ -2564,6 +2564,7 @@ static int stmmac_open(struct net_device
36 priv->dma_buf_sz = STMMAC_ALIGN(buf_sz);
37 priv->rx_copybreak = STMMAC_RX_COPYBREAK;
40 ret = alloc_dma_desc_resources(priv);