]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: stmmac: fix completely hung TX when using TSO
authorNiklas Cassel <niklas.cassel@axis.com>
Tue, 6 Jun 2017 07:25:00 +0000 (09:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2017 13:07:35 +0000 (15:07 +0200)
commit6bf499d388662b2ec338ae502b8155115aecaef8
tree9a2e37ad3a792266e5f3ea7dffa5580654943df3
parentd44184237a9d9e35e729302e3b3a8cd0d5931736
net: stmmac: fix completely hung TX when using TSO

[ Upstream commit 426849e6611f2092553f8d53372ae310818a6292 ]

stmmac_tso_allocator can fail to set the Last Descriptor bit
on a descriptor that actually was the last descriptor.

This happens when the buffer of the last descriptor ends
up having a size of exactly TSO_MAX_BUFF_SIZE.

When the IP eventually reaches the next last descriptor,
which actually has the bit set, the DMA will hang.

When the DMA hangs, we get a tx timeout, however,
since stmmac does not do a complete reset of the IP
in stmmac_tx_timeout, we end up in a state with
completely hung TX.

Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Acked-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c