]> 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)
commita21380dfbcbd29ef6e2ffdcc05cec790cc23e23d
treed95fa3fc87b1aeb6bbc07812f01e54e0a446bdf6
parent291d27b686750f9843bba109f8ce9c4a2442d1d4
net: stmmac: reset Tx desc base address before restarting Tx

commit 44702d700f917a2e3d2182869840503ac36abffd 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