From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <damon.chen@realtek.com>, <kevin_yang@realtek.com>
Subject: [PATCH rtw-next 12/12] wifi: rtw89: ser: post-recover DMAC state to prevent LPS
Date: Fri, 13 Feb 2026 14:15:52 +0800 [thread overview]
Message-ID: <20260213061552.29997-13-pkshih@realtek.com> (raw)
In-Reply-To: <20260213061552.29997-1-pkshih@realtek.com>
From: Zong-Zhe Yang <kevin_yang@realtek.com>
If entering LPS during SER (system error recovery), IMR might fail to
be re-enabled after SER. Then, the next SER would not be noticed well.
After FW v0.35.100.0, Wi-Fi 7 chipsets adjust the order in which SER
recovers DMAC state to prevent LPS from being in the middle of SER.
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/core.h | 1 +
drivers/net/wireless/realtek/rtw89/fw.c | 1 +
drivers/net/wireless/realtek/rtw89/mac.c | 7 ++++++-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h
index 5d1cec20bc80..cf0cc718f41c 100644
--- a/drivers/net/wireless/realtek/rtw89/core.h
+++ b/drivers/net/wireless/realtek/rtw89/core.h
@@ -4796,6 +4796,7 @@ enum rtw89_fw_feature {
RTW89_FW_FEATURE_SER_L1_BY_EVENT,
RTW89_FW_FEATURE_SIM_SER_L0L1_BY_HALT_H2C,
RTW89_FW_FEATURE_LPS_ML_INFO_V1,
+ RTW89_FW_FEATURE_SER_POST_RECOVER_DMAC,
NUM_OF_RTW89_FW_FEATURES,
};
diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index 67154e666ba2..c035e89e75dd 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -923,6 +923,7 @@ static const struct __fw_feat_cfg fw_feat_tbl[] = {
__CFG_FW_FEAT(RTL8922A, ge, 0, 35, 84, 0, RFK_PRE_NOTIFY_MCC_V1),
__CFG_FW_FEAT(RTL8922A, lt, 0, 35, 84, 0, ADDR_CAM_V0),
__CFG_FW_FEAT(RTL8922A, ge, 0, 35, 97, 0, SIM_SER_L0L1_BY_HALT_H2C),
+ __CFG_FW_FEAT(RTL8922A, ge, 0, 35, 100, 0, SER_POST_RECOVER_DMAC),
};
static void rtw89_fw_iterate_feature_cfg(struct rtw89_fw_info *fw,
diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c
index 243cc02ad24e..923f39e39a26 100644
--- a/drivers/net/wireless/realtek/rtw89/mac.c
+++ b/drivers/net/wireless/realtek/rtw89/mac.c
@@ -826,7 +826,9 @@ u32 rtw89_mac_get_err_status(struct rtw89_dev *rtwdev)
}
err = rtw89_read32(rtwdev, R_AX_HALT_C2H);
- rtw89_write32(rtwdev, R_AX_HALT_C2H_CTRL, 0);
+
+ if (!RTW89_CHK_FW_FEATURE(SER_POST_RECOVER_DMAC, &rtwdev->fw))
+ rtw89_write32(rtwdev, R_AX_HALT_C2H_CTRL, 0);
err_scnr = RTW89_ERROR_SCENARIO(err);
if (err_scnr == RTW89_WCPU_CPU_EXCEPTION)
@@ -846,6 +848,9 @@ u32 rtw89_mac_get_err_status(struct rtw89_dev *rtwdev)
if (chip->chip_gen != RTW89_CHIP_AX)
rtw89_write32(rtwdev, R_AX_HALT_C2H, 0);
+ if (RTW89_CHK_FW_FEATURE(SER_POST_RECOVER_DMAC, &rtwdev->fw))
+ rtw89_write32(rtwdev, R_AX_HALT_C2H_CTRL, 0);
+
return err;
}
EXPORT_SYMBOL(rtw89_mac_get_err_status);
--
2.25.1
prev parent reply other threads:[~2026-02-13 6:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-13 6:15 [PATCH rtw-next 00/12] wifi: rtw89: refine to read HW parameters from file, and update SER code Ping-Ke Shih
2026-02-13 6:15 ` [PATCH rtw-next 01/12] wifi: rtw89: fw: add fw_def struct to put firmware name and format version Ping-Ke Shih
2026-03-03 2:48 ` Ping-Ke Shih
2026-02-13 6:15 ` [PATCH rtw-next 02/12] wifi: rtw89: fw: recognize firmware type B by AID Ping-Ke Shih
2026-02-13 6:15 ` [PATCH rtw-next 03/12] wifi: rtw89: add general way to generate module firmware string Ping-Ke Shih
2026-02-13 6:15 ` [PATCH rtw-next 04/12] wifi: rtw89: 8852b: update supported firmware format to 2 Ping-Ke Shih
2026-02-13 6:15 ` [PATCH rtw-next 05/12] wifi: rtw89: 8852a: move DIG tables to rtw8852a.c Ping-Ke Shih
2026-02-13 6:15 ` [PATCH rtw-next 06/12] wifi: rtw89: 8852a: update supported firmware format to 1 Ping-Ke Shih
2026-02-13 6:15 ` [PATCH rtw-next 07/12] wifi: rtw89: 8851b: " Ping-Ke Shih
2026-02-13 6:15 ` [PATCH rtw-next 08/12] wifi: rtw89: add H2C command to protect TX/RX for unused PHY Ping-Ke Shih
2026-02-13 6:15 ` [PATCH rtw-next 09/12] wifi: rtw89: rfk: add hardware version to rtw89_fw_h2c_rf_pre_ntfy_mcc for new WiFi 7 firmware Ping-Ke Shih
2026-02-13 6:15 ` [PATCH rtw-next 10/12] wifi: rtw89: debug: add SER SW counters to count simulation Ping-Ke Shih
2026-02-13 6:15 ` [PATCH rtw-next 11/12] wifi: rtw89: ser: Wi-Fi 7 reset HALT C2H after reading it Ping-Ke Shih
2026-02-13 6:15 ` Ping-Ke Shih [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260213061552.29997-13-pkshih@realtek.com \
--to=pkshih@realtek.com \
--cc=damon.chen@realtek.com \
--cc=kevin_yang@realtek.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox