net: ethernet: mtk_wed: increase WED v2 WDMA RESV_BUFF to 0x80
Subsystems (4)
PATCH 1/1 net: ethernet: mtk_wed: increase WED v2 WDMA RESV_BUFF to 0x80
Change WDMA RESV_BUFF from 0x40 to 0x80 to avoid CDM TX FIFO overflow. Without this patch mt7986 and mt7981 may have WDMA TX hang issue. This patch was pulled from mtk-openwrt-feeds GPL open source project.
--- drivers/net/ethernet/mediatek/mtk_wed.c | 5 +++++ drivers/net/ethernet/mediatek/mtk_wed_regs.h | 1 + 2 files changed, 6 insertions(+)
drivers/net/ethernet/mediatek/mtk_wed.c +5 -0
@@ -2071,6 +2071,11 @@ mtk_wed_dma_enable(struct mtk_wed_device *dev)wdma_set (dev,MTK_WDMA_GLO_CFG ,MTK_WDMA_GLO_CFG_TX_DMA_EN ); } +if (mtk_wed_is_v2 (dev->hw)) +wdma_m32 (dev,MTK_WDMA_GLO_CFG , +MTK_WDMA_GLO_CFG_RESV_BUFF , +FIELD_PREP (MTK_WDMA_GLO_CFG_RESV_BUFF ,0x80 )); +wed_set (dev,MTK_WED_GLO_CFG ,MTK_WED_GLO_CFG_TX_DMA_EN |MTK_WED_GLO_CFG_RX_DMA_EN );
drivers/net/ethernet/mediatek/mtk_wed_regs.h +1 -0
@@ -433,6 +433,7 @@ struct mtk_wdma_desc {#define MTK_WDMA_GLO_CFG_TX_DMA_BUSY BIT(1)#define MTK_WDMA_GLO_CFG_RX_DMA_EN BIT(2)#define MTK_WDMA_GLO_CFG_RX_DMA_BUSY BIT(3) +#define MTK_WDMA_GLO_CFG_RESV_BUFF GENMASK(23, 16)#define MTK_WDMA_GLO_CFG_RX_INFO3_PRERES BIT(26)#define MTK_WDMA_GLO_CFG_RX_INFO2_PRERES BIT(27)#define MTK_WDMA_GLO_CFG_RX_INFO1_PRERES BIT(28)
Signature · 1 line
2.53.0
Quoted 6 lines · Shiji Yang
Change WDMA
RESV_BUFFfrom0x40to0x80to avoid CDM TX FIFO overflow. Without this patch mt7986 and mt7981 may have WDMA TX hang issue. This patch was pulled from mtk-openwrt-feeds GPL open source project.
As a bug fix for code present in the net tree, this should
1. Be targeted at the net tree
Subject: [PATCH net] ...
2. Be CCed to stable
3. Have a fixes tag. Perhaps this one?
I'm unsure if the maintainers would like a repost because of this. But at any rate, please keep it in mind for the future.
More information on the netdev development processes can be found here:
https://docs.kernel.org/process/maintainer-netdev.html
The above not withstanding, this looks good to me.
Jakub Kicinski
maintainerQuoted 3 lines · On Wed, 19 Aug 2026 21:07:07 +0800 Shiji Yang wrote:
Change WDMA
RESV_BUFFfrom0x40to0x80to avoid CDM TX FIFO overflow. Without this patch mt7986 and mt7981 may have WDMA TX hang issue. This patch was pulled from mtk-openwrt-feeds GPL open source project.
Lorenzo, could you TAL? (incl. Simon's suggestion of the Fixes tag)
Lorenzo Bianconi
maintainerQuoted 6 lines · Jakub Kicinski
Quoted 3 lines · On Wed, 19 Aug 2026 21:07:07 +0800 Shiji Yang wrote:
Change WDMA
RESV_BUFFfrom0x40to0x80to avoid CDM TX FIFO overflow. Without this patch mt7986 and mt7981 may have WDMA TX hang issue. This patch was pulled from mtk-openwrt-feeds GPL open source project.Lorenzo, could you TAL? (incl. Simon's suggestion of the Fixes tag)
sure, I am AFK now, I will review it next week.
Regards,
Lorenzo
Lorenzo Bianconi
maintainerQuoted 7 lines · Jakub Kicinski
Quoted 6 lines · On Wed, 19 Aug 2026 21:07:07 +0800 Shiji Yang wrote:
Quoted 3 lines
Change WDMA
RESV_BUFFfrom0x40to0x80to avoid CDM TX FIFO overflow. Without this patch mt7986 and mt7981 may have WDMA TX hang issue. This patch was pulled from mtk-openwrt-feeds GPL open source project.Lorenzo, could you TAL? (incl. Simon's suggestion of the Fixes tag)
I am wondering if this is necessary for v3 as well. @Rex any input on it?
Regarding Fixes tag, I think cf26df8833cc is the right one.
Regards,
Lorenzo
Quoted 5 lines
sure, I am AFK now, I will review it next week.
Regards,
Lorenzo
Hi Lorenzo,
it is only for v2. v3 changed the hw design and fixed it. so this RESV_BUFF register was removed
Thanks
Rex Lu
________________________________________
寄件者: Lorenzo Bianconi
已傳送: 星期一, 2026 年 8 月 24 日 下午 03:48
收件者: Jakub Kicinski
副本: Shiji Yang; [email protected]; Rex Lu (盧建銘); Felix Fietkau; Andrew Lunn; David S. Miller; Eric Dumazet; Paolo Abeni; Matthias Brugger; AngeloGioacchino Del Regno; [email protected]; [email protected]; [email protected] 主旨: Re: [PATCH] net: ethernet: mtk_wed: increase WED v2 WDMA RESV_BUFF to 0x80
Quoted 7 lines · Jakub Kicinski
Quoted 6 lines · On Wed, 19 Aug 2026 21:07:07 +0800 Shiji Yang wrote:
Quoted 3 lines
Change WDMA
RESV_BUFFfrom0x40to0x80to avoid CDM TX FIFO overflow. Without this patch mt7986 and mt7981 may have WDMA TX hang issue. This patch was pulled from mtk-openwrt-feeds GPL open source project.Lorenzo, could you TAL? (incl. Simon's suggestion of the Fixes tag)
I am wondering if this is necessary for v3 as well. @Rex any input on it?
Regarding Fixes tag, I think cf26df8833cc is the right one.
Regards,
Lorenzo
Quoted 5 lines
sure, I am AFK now, I will review it next week.
Regards,
Lorenzo
Quoted 3 lines
Hi Lorenzo,
it is only for v2. v3 changed the hw design and fixed it. so this
RESV_BUFFregister was removed
Hi Rex,
thx for pointing this out. In this case:
Quoted 33 lines
Thanks
Rex Lu
________________________________________
寄件者: Lorenzo Bianconi
已傳送: 星期一, 2026 年 8 月 24 日 下午 03:48
收件者: Jakub Kicinski
副本: Shiji Yang; [email protected]; Rex Lu (盧建銘); Felix Fietkau; Andrew Lunn; David S. Miller; Eric Dumazet; Paolo Abeni; Matthias Brugger; AngeloGioacchino Del Regno; [email protected]; [email protected]; [email protected] 主旨: Re: [PATCH] net: ethernet:mtk_wed: increase WED v2 WDMARESV_BUFFto0x80Quoted 7 lines · Jakub Kicinski
Quoted 6 lines · On Wed, 19 Aug 2026 21:07:07 +0800 Shiji Yang wrote:
Quoted 3 lines
Change WDMA
RESV_BUFFfrom0x40to0x80to avoid CDM TX FIFO overflow. Without this patch mt7986 and mt7981 may have WDMA TX hang issue. This patch was pulled from mtk-openwrt-feeds GPL open source project.Lorenzo, could you TAL? (incl. Simon's suggestion of the Fixes tag)
I am wondering if this is necessary for v3 as well. @Rex any input on it?
Regarding Fixes tag, I think
cf26df8833ccis the right one.Regards,
LorenzoQuoted 5 lines
sure, I am AFK now, I will review it next week.
Regards,
Lorenzo
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Wed, 19 Aug 2026 21:07:07 +0800 you wrote:
Change WDMA
RESV_BUFFfrom0x40to0x80to avoid CDM TX FIFO overflow. Without this patch mt7986 and mt7981 may have WDMA TX hang issue. This patch was pulled from mtk-openwrt-feeds GPL open source project.Signed-off-by Shiji Yang <[email protected]>[...]
Here is the summary with links:
- net: ethernet: mtk_wed: increase WED v2 WDMA RESV_BUFF to 0x80
https://git.kernel.org/netdev/net/c/c0ef04232f9f
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html