mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-18 05:36:57 +08:00
42 lines
1.7 KiB
Diff
42 lines
1.7 KiB
Diff
From 915a081ff307d61d6551d6c16b542e03775353c4 Mon Sep 17 00:00:00 2001
|
|
From: Carl Huang <cjhuang@codeaurora.org>
|
|
Date: Fri, 19 Nov 2021 15:36:26 +0200
|
|
Subject: [PATCH] ath11k: do not restore ASPM in case of single MSI vector
|
|
|
|
Current code enables ASPM by default, it allows MHI to enter M2 state.
|
|
In case of one MSI vector, system hang is observed if ath11k does MHI
|
|
register reading in this state. The issue was reported on Dell XPS 13
|
|
9310 but is seen also on XPS 15 and XPS 17 laptops.
|
|
|
|
The workaround here is to prevent MHI from entering M2 state, this can
|
|
be done by disabling ASPM if only one MSI vector is used. When using 32
|
|
vectors ASPM is enabled as before.
|
|
|
|
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
|
|
|
|
Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
|
|
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
|
|
Link: https://lore.kernel.org/r/20211026041722.5271-1-bqiang@codeaurora.org
|
|
---
|
|
drivers/net/wireless/ath/ath11k/pci.c | 8 +++++++-
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/net/wireless/ath/ath11k/pci.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/pci.c
|
|
@@ -1229,7 +1229,13 @@ static int ath11k_pci_start(struct ath11
|
|
|
|
set_bit(ATH11K_PCI_FLAG_INIT_DONE, &ab_pci->flags);
|
|
|
|
- ath11k_pci_aspm_restore(ab_pci);
|
|
+ /* TODO: for now don't restore ASPM in case of single MSI
|
|
+ * vector as MHI register reading in M2 causes system hang.
|
|
+ */
|
|
+ if (test_bit(ATH11K_PCI_FLAG_MULTI_MSI_VECTORS, &ab_pci->flags))
|
|
+ ath11k_pci_aspm_restore(ab_pci);
|
|
+ else
|
|
+ ath11k_info(ab, "leaving PCI ASPM disabled to avoid MHI M2 problems\n");
|
|
|
|
ath11k_pci_ce_irqs_enable(ab);
|
|
ath11k_ce_rx_post_buf(ab);
|