]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: reset Tx desc base address before restarting Tx
authorJongsung Kim <neidhard.kim@lge.com>
Fri, 6 Dec 2019 11:40:00 +0000 (20:40 +0900)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Dec 2019 19:50:36 +0000 (11:50 -0800)
commitf421031e3ff0dd288a6e1bbde9aa41a25bb814e6
tree59ddd430a787a6a88bb7c4f9876f5cf8eb57ec1c
parenta6a10d45d1eaf3fe20dd73ff4ef07e6dc40ec6d9
net: stmmac: reset Tx desc base address before restarting Tx

Refer to the databook of DesignWare Cores Ethernet MAC Universal:

6.2.1.5 Register 4 (Transmit Descriptor List Address Register

If this register is not changed when the ST bit is set to 0, then
the DMA takes the descriptor address where it was stopped earlier.

The stmmac_tx_err() does zero indices to Tx descriptors, but does
not reset HW current Tx descriptor address. To fix inconsistency,
the base address of the Tx descriptors should be rewritten before
restarting Tx.

Signed-off-by: Jongsung Kim <neidhard.kim@lge.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c