mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-04 21:14:21 +00:00
b5d425af23
Increase DMA burst size and tx ring size and optimize tx processing Signed-off-by: Felix Fietkau <nbd@nbd.name>
35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
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,
|