]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: don't set own bit too early for jumbo frames
authorAaro Koskinen <aaro.koskinen@nokia.com>
Thu, 14 Mar 2019 19:43:19 +0000 (21:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Mar 2019 18:38:57 +0000 (11:38 -0700)
commit4ddf7a32c83c108f7ea0a6a84c48d6262e9c3e19
treee1653809793e21b67b11ea2a60423e384c0609d1
parent20837457b5d659ce0b2bdcb13ecc077c0eb23e7f
net: stmmac: don't set own bit too early for jumbo frames

Commit 6c29ff33ee6e ("stmmac: first frame prep at the end of xmit
routine") overlooked jumbo frames when re-ordering the code, and as a
result the own bit was not getting set anymore for the first jumbo frame
descriptor. Commit 6fd427be0d27 ("net: stmmac: Set OWN bit for jumbo
frames") tried to fix this, but now the bit is getting set too early and
the DMA may start while we are still setting up the remaining descriptors.
And with the chain mode the own bit remains still unset.

Fix by setting the own bit at the end of xmit also with jumbo frames.

Fixes: 6c29ff33ee6e ("stmmac: first frame prep at the end of xmit routine")
Fixes: 6fd427be0d27 ("net: stmmac: Set OWN bit for jumbo frames")
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Acked-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/ring_mode.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c