a192250e28b43b9e5e98c12d29f0d86f3d99e357
[openwrt/openwrt.git] /
1 From 59555a8d0dd39bf60b7ca1ba5e7393d293f7398d Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@nbd.name>
3 Date: Thu, 22 Apr 2021 22:21:00 -0700
4 Subject: [PATCH] net: ethernet: mtk_eth_soc: use larger burst size for QDMA TX
5
6 Improves tx performance
7
8 Signed-off-by: Felix Fietkau <nbd@nbd.name>
9 Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
10 Signed-off-by: David S. Miller <davem@davemloft.net>
11 ---
12 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +-
13 drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +-
14 2 files changed, 2 insertions(+), 2 deletions(-)
15
16 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
17 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
18 @@ -2214,7 +2214,7 @@ static int mtk_start_dma(struct mtk_eth
19 if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
20 mtk_w32(eth,
21 MTK_TX_WB_DDONE | MTK_TX_DMA_EN |
22 - MTK_DMA_SIZE_16DWORDS | MTK_NDP_CO_PRO |
23 + MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO |
24 MTK_RX_DMA_EN | MTK_RX_2B_OFFSET |
25 MTK_RX_BT_32DWORDS,
26 MTK_QDMA_GLO_CFG);
27 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
28 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
29 @@ -202,7 +202,7 @@
30 #define MTK_RX_BT_32DWORDS (3 << 11)
31 #define MTK_NDP_CO_PRO BIT(10)
32 #define MTK_TX_WB_DDONE BIT(6)
33 -#define MTK_DMA_SIZE_16DWORDS (2 << 4)
34 +#define MTK_TX_BT_32DWORDS (3 << 4)
35 #define MTK_RX_DMA_BUSY BIT(3)
36 #define MTK_TX_DMA_BUSY BIT(1)
37 #define MTK_RX_DMA_EN BIT(2)