aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2020-09-09 11:51:21 +0200
committerFelix Fietkau <nbd@nbd.name>2020-09-09 11:51:47 +0200
commit668c988fc5e1d028dc1b9dfed8ed332b0a9073c8 (patch)
tree8b26ba7fbd837bbf6009e04c4009d2ee426bdfa9 /target/linux/generic
parentd717343c85f6c305b6896e4d3aa93f9cd67e9d22 (diff)
downloadupstream-668c988fc5e1d028dc1b9dfed8ed332b0a9073c8.tar.gz
upstream-668c988fc5e1d028dc1b9dfed8ed332b0a9073c8.tar.bz2
upstream-668c988fc5e1d028dc1b9dfed8ed332b0a9073c8.zip
mediatek/ramips: remove an ethernet optimization patch that was reported to cause a regression
In some tests, crashes were observed Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/generic')
-rw-r--r--target/linux/generic/pending-5.4/770-07-net-ethernet-mtk_eth_soc-drop-descriptor-cpu-own-bit.patch34
-rw-r--r--target/linux/generic/pending-5.4/770-08-net-ethernet-mtk_eth_soc-cache-hardware-pointer-of-l.patch6
-rw-r--r--target/linux/generic/pending-5.4/770-11-net-ethernet-mtk_eth_soc-avoid-rearming-interrupt-if.pa4
3 files changed, 5 insertions, 39 deletions
diff --git a/target/linux/generic/pending-5.4/770-07-net-ethernet-mtk_eth_soc-drop-descriptor-cpu-own-bit.patch b/target/linux/generic/pending-5.4/770-07-net-ethernet-mtk_eth_soc-drop-descriptor-cpu-own-bit.patch
deleted file mode 100644
index 0a9dfd68a1..0000000000
--- a/target/linux/generic/pending-5.4/770-07-net-ethernet-mtk_eth_soc-drop-descriptor-cpu-own-bit.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Date: Wed, 26 Aug 2020 17:48:14 +0200
-Subject: [PATCH] net: ethernet: mtk_eth_soc: drop descriptor cpu-own bit check
- in qdma tx cleanup
-
-mtk_poll_tx_qdma already checks the MTK_QTX_DRX_PTR register, which points
-at the last completed descriptor.
-To slightly improve performance, also remove the register bit which forces
-the hardware to write back this bit earlier.
-
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1368,9 +1368,6 @@ static int mtk_poll_tx_qdma(struct mtk_e
- int mac = 0;
-
- desc = mtk_qdma_phys_to_virt(ring, desc->txd2);
-- if ((desc->txd3 & TX_DMA_OWNER_CPU) == 0)
-- break;
--
- tx_buf = mtk_desc_to_tx_buf(ring, desc);
- if (tx_buf->flags & MTK_TX_FLAGS_FPORT1)
- mac = 1;
-@@ -2203,7 +2200,7 @@ static int mtk_start_dma(struct mtk_eth
-
- if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
- mtk_w32(eth,
-- MTK_TX_WB_DDONE | MTK_TX_DMA_EN |
-+ MTK_TX_DMA_EN |
- MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO |
- MTK_RX_DMA_EN | MTK_RX_2B_OFFSET |
- MTK_RX_BT_32DWORDS,
diff --git a/target/linux/generic/pending-5.4/770-08-net-ethernet-mtk_eth_soc-cache-hardware-pointer-of-l.patch b/target/linux/generic/pending-5.4/770-08-net-ethernet-mtk_eth_soc-cache-hardware-pointer-of-l.patch
index ddbd751ead..29dfd932e7 100644
--- a/target/linux/generic/pending-5.4/770-08-net-ethernet-mtk_eth_soc-cache-hardware-pointer-of-l.patch
+++ b/target/linux/generic/pending-5.4/770-08-net-ethernet-mtk_eth_soc-cache-hardware-pointer-of-l.patch
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
dma = mtk_r32(eth, MTK_QTX_DRX_PTR);
desc = mtk_qdma_phys_to_virt(ring, cpu);
-@@ -1389,6 +1389,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -1392,6 +1392,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
cpu = next_cpu;
}
@@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
mtk_w32(eth, cpu, MTK_QTX_CRX_PTR);
return budget;
-@@ -1589,6 +1590,7 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -1592,6 +1593,7 @@ static int mtk_tx_alloc(struct mtk_eth *
atomic_set(&ring->free_count, MTK_DMA_SIZE - 2);
ring->next_free = &ring->dma[0];
ring->last_free = &ring->dma[MTK_DMA_SIZE - 1];
@@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ring->thresh = MAX_SKB_FRAGS;
/* make sure that all changes to the dma ring are flushed before we
-@@ -1602,9 +1604,7 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -1605,9 +1607,7 @@ static int mtk_tx_alloc(struct mtk_eth *
mtk_w32(eth,
ring->phys + ((MTK_DMA_SIZE - 1) * sz),
MTK_QTX_CRX_PTR);
diff --git a/target/linux/generic/pending-5.4/770-11-net-ethernet-mtk_eth_soc-avoid-rearming-interrupt-if.pa b/target/linux/generic/pending-5.4/770-11-net-ethernet-mtk_eth_soc-avoid-rearming-interrupt-if.pa
index c8d17aefa8..e56799eb16 100644
--- a/target/linux/generic/pending-5.4/770-11-net-ethernet-mtk_eth_soc-avoid-rearming-interrupt-if.pa
+++ b/target/linux/generic/pending-5.4/770-11-net-ethernet-mtk_eth_soc-avoid-rearming-interrupt-if.pa
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1512,8 +1512,8 @@ static int mtk_napi_tx(struct napi_struc
+@@ -1515,8 +1515,8 @@ static int mtk_napi_tx(struct napi_struc
if (status & MTK_TX_DONE_INT)
return budget;
@@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return tx_done;
}
-@@ -1546,8 +1546,9 @@ poll_again:
+@@ -1549,8 +1549,9 @@ poll_again:
remain_budget -= rx_done;
goto poll_again;
}