]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Sep 2021 09:49:30 +0000 (11:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Sep 2021 09:49:30 +0000 (11:49 +0200)
added patches:
net-stmmac-reset-tx-desc-base-address-before-restarting-tx.patch

queue-5.4/net-stmmac-reset-tx-desc-base-address-before-restarting-tx.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/net-stmmac-reset-tx-desc-base-address-before-restarting-tx.patch b/queue-5.4/net-stmmac-reset-tx-desc-base-address-before-restarting-tx.patch
new file mode 100644 (file)
index 0000000..319e377
--- /dev/null
@@ -0,0 +1,40 @@
+From f421031e3ff0dd288a6e1bbde9aa41a25bb814e6 Mon Sep 17 00:00:00 2001
+From: Jongsung Kim <neidhard.kim@lge.com>
+Date: Fri, 6 Dec 2019 20:40:00 +0900
+Subject: net: stmmac: reset Tx desc base address before restarting Tx
+
+From: Jongsung Kim <neidhard.kim@lge.com>
+
+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 |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+@@ -1987,6 +1987,8 @@ static void stmmac_tx_err(struct stmmac_
+       tx_q->cur_tx = 0;
+       tx_q->mss = 0;
+       netdev_tx_reset_queue(netdev_get_tx_queue(priv->dev, chan));
++      stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
++                          tx_q->dma_tx_phy, chan);
+       stmmac_start_tx_dma(priv, chan);
+       priv->dev->stats.tx_errors++;
index fa908171cfd50e0b5b0c7cc78c9e7b3dbd2811f6..2f02afa9ac016e190a21dbed0d7716110955ddb5 100644 (file)
@@ -25,3 +25,4 @@ profiling-fix-shift-out-of-bounds-bugs.patch
 pwm-lpc32xx-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch
 pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch
 phy-avoid-unnecessary-link-up-delay-in-polling-mode.patch
+net-stmmac-reset-tx-desc-base-address-before-restarting-tx.patch