From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 974903FAE11; Tue, 21 Jul 2026 18:50:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784659829; cv=none; b=tvdWcwObgRcE6HWDSgBTPUMlo+g71HsWXGpced5LX0vzQB3RuwZlBobzaNowDYwSNiLXqz1Yu5D1nO/7UuMHZ47FGpBKNqIXolDOqgnxIj/lG7celMCMDatgaoyLAzYmM4mNSuDZzidpW6FXOThxpPgKEM0rnoNbvQ3QeuzNFYo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784659829; c=relaxed/simple; bh=xH0H+iVVN5wsh+tgeNd9GG754MBJGeWokwW8VwPI9G0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K4j/cUXZkGr3IqUbXwEqbxQZz9dqTJ0PqEok6iarSFdImoPxxu3FkdwuhZegYdtCHmiHqIMID3oEvvtC2WyZ+1TXrf2IhW9SfjQoAbXkzzFr0Y8mhwND3+iJFxHGZDfqAgTv/OAwQXQiXCsAckg8qZpZUF/sIbGI9odLJARPNB0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1WeXY8z2; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="1WeXY8z2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09BE81F000E9; Tue, 21 Jul 2026 18:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784659828; bh=hAPRI3AF6LvRThvvzymjnqxTHRxZowsKX8mgfQggxvo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=1WeXY8z292rzapw09wnKeZAsRPN7hNCDCUXccLTCqZOvCatWR6GiYdrzbUnqiwC5f Zuw/ipOnYK4L0uXCkN82X2vdXw6itn+nM6jglnZ73unFPK/6ayzd3ifWlCh2Yjxcwj bjNZJeaYeqErlnKme1DjM1raR4Uj/UjXhlMIvG1k= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Zhi-Jun You , Jakub Kicinski , Sasha Levin Subject: [PATCH 7.1 0750/2077] net: ethernet: mtk_wed: fix loading WO firmware for MT7986 Date: Tue, 21 Jul 2026 17:07:03 +0200 Message-ID: <20260721152610.483059811@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152552.646164743@linuxfoundation.org> References: <20260721152552.646164743@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zhi-Jun You [ Upstream commit 9192a18f6de2f5e3eb3813ecd2895ac0f5c008a9 ] 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") Signed-off-by: Zhi-Jun You Link: https://patch.msgid.link/20260611150051.586-1-hujy652@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/mediatek/mtk_wed_mcu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c index fa6b2160341692..0d38183c6ba704 100644 --- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c +++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c @@ -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); -- 2.53.0