From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lars Persson Subject: [PATCH net] stmmac: reset last TSO segment size after device open Date: Fri, 1 Dec 2017 11:12:44 +0100 Message-ID: <20171201101244.16675-1-larper@axis.com> Cc: Lars Persson To: peppe.cavallaro@st.com, alexandre.torgue@st.com, netdev@vger.kernel.org Return-path: Received: from bastet.se.axis.com ([195.60.68.11]:39751 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751666AbdLAKMw (ORCPT ); Fri, 1 Dec 2017 05:12:52 -0500 Sender: netdev-owner@vger.kernel.org List-ID: 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: f748be531d70 ("stmmac: support new GMAC4") Signed-off-by: Lars Persson --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index f63c2ddced3c..d7250539d0bd 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -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) { -- 2.11.0