]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Sep 2021 12:07:09 +0000 (14:07 +0200)
commit4c43489af493a559bc0e0e142ecc49f6ca17bc0d
treed95fa3fc87b1aeb6bbc07812f01e54e0a446bdf6
parent32f9970c1cf578baba54ca87023c15d934c6cc44
net: stmmac: reset Tx desc base address before restarting Tx

commit f421031e3ff0dd288a6e1bbde9aa41a25bb814e6 upstream.

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>
Cc: Macpaul Lin <macpaul.lin@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c