Skip to content

Commit 7588a89

Browse files
Baochen QiangJeff Johnson
authored andcommitted
wifi: ath12k: fix GCC_GCC_PCIE_HOT_RST definition for WCN7850
GCC_GCC_PCIE_HOT_RST is wrongly defined for WCN7850, causing kernel crash on some specific platforms. Since this register is divergent for WCN7850 and QCN9274, move it to register table to allow different definitions. Then correct the register address for WCN7850 to fix this issue. Note IPQ5332 is not affected as it is not PCIe based device. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang <[email protected]> Reviewed-by: Vasanthakumar Thiagarajan <[email protected]> Reported-by: Parth Pancholi <[email protected]> Closes: https://lore.kernel.org/all/[email protected] Fixes: d889913 ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Tested-by: Parth Pancholi <[email protected]> Link: https://patch.msgid.link/20250523-ath12k-wrong-global-reset-addr-v1-1-3b06eb556196@quicinc.com Signed-off-by: Jeff Johnson <[email protected]>
1 parent b0d226a commit 7588a89

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

drivers/net/wireless/ath/ath12k/hw.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,8 @@ static const struct ath12k_hw_regs qcn9274_v1_regs = {
951951
.hal_umac_ce0_dest_reg_base = 0x01b81000,
952952
.hal_umac_ce1_src_reg_base = 0x01b82000,
953953
.hal_umac_ce1_dest_reg_base = 0x01b83000,
954+
955+
.gcc_gcc_pcie_hot_rst = 0x1e38338,
954956
};
955957

956958
static const struct ath12k_hw_regs qcn9274_v2_regs = {
@@ -1042,6 +1044,8 @@ static const struct ath12k_hw_regs qcn9274_v2_regs = {
10421044
.hal_umac_ce0_dest_reg_base = 0x01b81000,
10431045
.hal_umac_ce1_src_reg_base = 0x01b82000,
10441046
.hal_umac_ce1_dest_reg_base = 0x01b83000,
1047+
1048+
.gcc_gcc_pcie_hot_rst = 0x1e38338,
10451049
};
10461050

10471051
static const struct ath12k_hw_regs ipq5332_regs = {
@@ -1215,6 +1219,8 @@ static const struct ath12k_hw_regs wcn7850_regs = {
12151219
.hal_umac_ce0_dest_reg_base = 0x01b81000,
12161220
.hal_umac_ce1_src_reg_base = 0x01b82000,
12171221
.hal_umac_ce1_dest_reg_base = 0x01b83000,
1222+
1223+
.gcc_gcc_pcie_hot_rst = 0x1e40304,
12181224
};
12191225

12201226
static const struct ath12k_hw_hal_params ath12k_hw_hal_params_qcn9274 = {

drivers/net/wireless/ath/ath12k/hw.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,8 @@ struct ath12k_hw_regs {
375375
u32 hal_reo_cmd_ring_base;
376376

377377
u32 hal_reo_status_ring_base;
378+
379+
u32 gcc_gcc_pcie_hot_rst;
378380
};
379381

380382
static inline const char *ath12k_bd_ie_type_str(enum ath12k_bd_ie_type type)

drivers/net/wireless/ath/ath12k/pci.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,10 @@ static void ath12k_pci_enable_ltssm(struct ath12k_base *ab)
292292

293293
ath12k_dbg(ab, ATH12K_DBG_PCI, "pci ltssm 0x%x\n", val);
294294

295-
val = ath12k_pci_read32(ab, GCC_GCC_PCIE_HOT_RST);
295+
val = ath12k_pci_read32(ab, GCC_GCC_PCIE_HOT_RST(ab));
296296
val |= GCC_GCC_PCIE_HOT_RST_VAL;
297-
ath12k_pci_write32(ab, GCC_GCC_PCIE_HOT_RST, val);
298-
val = ath12k_pci_read32(ab, GCC_GCC_PCIE_HOT_RST);
297+
ath12k_pci_write32(ab, GCC_GCC_PCIE_HOT_RST(ab), val);
298+
val = ath12k_pci_read32(ab, GCC_GCC_PCIE_HOT_RST(ab));
299299

300300
ath12k_dbg(ab, ATH12K_DBG_PCI, "pci pcie_hot_rst 0x%x\n", val);
301301

drivers/net/wireless/ath/ath12k/pci.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
#define PCIE_PCIE_PARF_LTSSM 0x1e081b0
2929
#define PARM_LTSSM_VALUE 0x111
3030

31-
#define GCC_GCC_PCIE_HOT_RST 0x1e38338
31+
#define GCC_GCC_PCIE_HOT_RST(ab) \
32+
((ab)->hw_params->regs->gcc_gcc_pcie_hot_rst)
33+
3234
#define GCC_GCC_PCIE_HOT_RST_VAL 0x10
3335

3436
#define PCIE_PCIE_INT_ALL_CLEAR 0x1e08228

0 commit comments

Comments
 (0)