public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
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 11/12] wifi: rtw89: ser: Wi-Fi 7 reset HALT C2H after reading it
Date: Fri, 13 Feb 2026 14:15:51 +0800	[thread overview]
Message-ID: <20260213061552.29997-12-pkshih@realtek.com> (raw)
In-Reply-To: <20260213061552.29997-1-pkshih@realtek.com>

From: Zong-Zhe Yang <kevin_yang@realtek.com>

When a SER (system error recovery) interrupt happens, driver reads HALT C2H
register to get the error status via MAC. For Wi-Fi 7 chipset, driver needs
to reset HALT C2H register after reading it to make FW aware that.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/mac.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c
index 4d507eccaa00..243cc02ad24e 100644
--- a/drivers/net/wireless/realtek/rtw89/mac.c
+++ b/drivers/net/wireless/realtek/rtw89/mac.c
@@ -814,6 +814,7 @@ static bool rtw89_mac_suppress_log(struct rtw89_dev *rtwdev, u32 err)
 u32 rtw89_mac_get_err_status(struct rtw89_dev *rtwdev)
 {
 	const struct rtw89_mac_gen_def *mac = rtwdev->chip->mac_def;
+	const struct rtw89_chip_info *chip = rtwdev->chip;
 	u32 err, err_scnr;
 	int ret;
 
@@ -836,11 +837,15 @@ u32 rtw89_mac_get_err_status(struct rtw89_dev *rtwdev)
 		err = MAC_AX_ERR_RXI300;
 
 	if (rtw89_mac_suppress_log(rtwdev, err))
-		return err;
+		goto bottom;
 
 	rtw89_fw_st_dbg_dump(rtwdev);
 	mac->dump_err_status(rtwdev, err);
 
+bottom:
+	if (chip->chip_gen != RTW89_CHIP_AX)
+		rtw89_write32(rtwdev, R_AX_HALT_C2H, 0);
+
 	return err;
 }
 EXPORT_SYMBOL(rtw89_mac_get_err_status);
-- 
2.25.1


  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 ` Ping-Ke Shih [this message]
2026-02-13  6:15 ` [PATCH rtw-next 12/12] wifi: rtw89: ser: post-recover DMAC state to prevent LPS Ping-Ke Shih

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-12-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