Skip to contentSkip to conversation

wifi: ath11k: adjust a comment to reflect reality

PATCH Superseded Kevin Lo 2 participants 3 messages Feb 27, 2024 – Mar 4, 2024 Qualcomm Atheros ATH11K wireless driver

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Kevin Lo

author
#0 lore raw

PATCH 1/1 wifi: ath11k: adjust a comment to reflect reality

In ath11k_mhi_set_mhictrl_reset(), I observed on QCA6390/QCN9074/WCN6855, MHISTATUS has SYSERR bit always been set after SOC_GLOBAL_RESET.

---

drivers/net/wireless/ath/ath11k/mhi.c +2 -2
index 3de7fa6f88d0..1198e80d9dff 100644
@@ -158,8 +158,8 @@ void ath11k_mhi_set_mhictrl_reset(struct ath11k_base *ab)
 
 	ath11k_dbg(ab, ATH11K_DBG_PCI, "mhistatus 0x%x\n", val);
 
-	/* Observed on QCA6390 that after SOC_GLOBAL_RESET, MHISTATUS
-	 * has SYSERR bit set and thus need to set MHICTRL_RESET
+	/* After SOC_GLOBAL_RESET, MHISTATUS has SYSERR bit
+	 * always been set and thus need to set MHICTRL_RESET
 	 * to clear SYSERR.
 	 */
 	ath11k_pcic_write32(ab, MHICTRL, MHICTRL_RESET_MASK);
#1 lore raw
Quoted 10 lines · Kevin Lo

In ath11k_mhi_set_mhictrl_reset(), I observed on QCA6390/QCN9074/WCN6855, MHISTATUS has SYSERR bit always been set after SOC_GLOBAL_RESET.

---

drivers/net/wireless/ath/ath11k/mhi.c +0 -0
index 3de7fa6f88d0..1198e80d9dff 100644

drivers/net/wireless/ath/ath11k/mhi.c void ath11k_mhi_set_mhictrl_reset(struct ath11k_base *ab) · line 165

Quoted 10 lines
drivers/net/wireless/ath/ath11k/mhi.c +2 -2
@@ -158,8 +158,8 @@ void ath11k_mhi_set_mhictrl_reset(struct ath11k_base *ab)
 
 	ath11k_dbg(ab, ATH11K_DBG_PCI, "mhistatus 0x%x\n", val);
 
-	/* Observed on QCA6390 that after SOC_GLOBAL_RESET, MHISTATUS
-	 * has SYSERR bit set and thus need to set MHICTRL_RESET
+	/* After SOC_GLOBAL_RESET, MHISTATUS has SYSERR bit
+	 * always been set and thus need to set MHICTRL_RESET
 	 * to clear SYSERR.
 	 */
 	ath11k_pcic_write32(ab, MHICTRL, MHICTRL_RESET_MASK);

Unless you've verified this is always true for every supported chipset I'd rather more accurately say something like:
After SOC_GLOBAL_RESET, MHISTATUS may still have SYSERR bit set and thus...

author
#2 lore raw
Quoted 15 lines · Jeff Johnson
Quoted 13 lines · Kevin Lo

In ath11k_mhi_set_mhictrl_reset(), I observed on QCA6390/QCN9074/WCN6855, MHISTATUS has SYSERR bit always been set after SOC_GLOBAL_RESET.

---

drivers/net/wireless/ath/ath11k/mhi.c +0 -0
index 3de7fa6f88d0..1198e80d9dff 100644
@@ -158,8 +158,8 @@ void ath11k_mhi_set_mhictrl_reset(struct ath11k_base *ab)
 
 	ath11k_dbg(ab, ATH11K_DBG_PCI, "mhistatus 0x%x\n", val);
 
Quoted 9 lines

drivers/net/wireless/ath/ath11k/mhi.c void ath11k_mhi_set_mhictrl_reset(struct ath11k_base *ab) · line 165

Quoted 7 lines
drivers/net/wireless/ath/ath11k/mhi.c +2 -2
-	/* Observed on QCA6390 that after SOC_GLOBAL_RESET, MHISTATUS
-	 * has SYSERR bit set and thus need to set MHICTRL_RESET
+	/* After SOC_GLOBAL_RESET, MHISTATUS has SYSERR bit
+	 * always been set and thus need to set MHICTRL_RESET
 	 * to clear SYSERR.
 	 */
 	ath11k_pcic_write32(ab, MHICTRL, MHICTRL_RESET_MASK);

Unless you've verified this is always true for every supported chipset

Only PCIe devices trigger the call to ath11k_mhi_set_mhictrl_reset(), and I've verified this on the QCA6390, QCN9074, and WCN6855 chips.

Quoted 2 lines

I'd rather more accurately say something like:
After SOC_GLOBAL_RESET, MHISTATUS may still have SYSERR bit set and thus...

Okay, I'll update the comments as per your suggestion, thanks.