Skip to contentSkip to conversation

net: ethernet: mtk_wed: fix loading WO firmware for MT7986

PATCH Applied Zhi-Jun You 2 participants 2 messages Jun 11 – Jun 13

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ethernet: mtk_wed: fix loading WO firmware for MT7986

MT7986 requires a different mask for second WO firmware. Without this, WO would timeout after loading FW.

The correct mask was removed when adding WED for MT7988. Add it back and add a WED version check to fix it.

This can be reproduced with a MT7986 + MT7916 board.

Fixes e2f64db13aa1 ("net: ethernet: mtk_wed: introduce WED support for MT7988")
---
 drivers/net/ethernet/mediatek/mtk_wed_mcu.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/net/ethernet/mediatek/mtk_wed_mcu.c +6 -2
index fa6b21603416..0d38183c6ba7 100644
@@ -367,8 +367,12 @@ mtk_wed_mcu_load_firmware(struct mtk_wed_wo *wo)
 	/* wo firmware reset */
 	wo_w32(MTK_WO_MCU_CFG_LS_WF_MCCR_CLR_ADDR, 0xc00);
 
-	val = wo_r32(MTK_WO_MCU_CFG_LS_WF_MCU_CFG_WM_WA_ADDR) |
-	      MTK_WO_MCU_CFG_LS_WF_WM_WA_WM_CPU_RSTB_MASK;
+	val = wo_r32(MTK_WO_MCU_CFG_LS_WF_MCU_CFG_WM_WA_ADDR);
+
+	if (!mtk_wed_is_v3_or_greater(wo->hw) && wo->hw->index)
+		val |= MTK_WO_MCU_CFG_LS_WF_WM_WA_WA_CPU_RSTB_MASK;
+	else
+		val |= MTK_WO_MCU_CFG_LS_WF_WM_WA_WM_CPU_RSTB_MASK;
 	wo_w32(MTK_WO_MCU_CFG_LS_WF_MCU_CFG_WM_WA_ADDR, val);
 out:
 	release_firmware(fw);
Signature · 1 line
2.47.3
#1 lore raw
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 9 lines · On Thu, 11 Jun 2026 23:00:51 +0800 you wrote:

MT7986 requires a different mask for second WO firmware. Without this, WO would timeout after loading FW.

The correct mask was removed when adding WED for MT7988. Add it back and add a WED version check to fix it.

This can be reproduced with a MT7986 + MT7916 board.

[...]

Here is the summary with links:
- net: ethernet: mtk_wed: fix loading WO firmware for MT7986

    https://git.kernel.org/netdev/net/c/9192a18f6de2

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html