]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Wed, 27 Oct 2021 23:04:22 +0000 (17:04 -0600)
commitd190ae5567120b384600339d748b91effb76ae0a
treebf8885de9895c8386065953f5bc88e3db6fe3d33
parent33e4eae911450a39f552014810ccf42d1fddc913
net: stmmac: reset Tx desc base address before restarting Tx

BugLink: https://bugs.launchpad.net/bugs/1947885
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c