Skip to content

Commit 5fcfe0f

Browse files
committed
Workaround iwlwifi load issue for AX200-series when MSI-X is unavailable
Partially fixes QubesOS/qubes-issues#5615
1 parent b1bc9ec commit 5fcfe0f

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
From b4024bb479b2ee9b34125b65472a0537043c8dc4 Mon Sep 17 00:00:00 2001
2+
From: Chris Rogers <crogers122@gmail.com>
3+
Date: Thu, 1 Sep 2022 15:56:14 +0200
4+
Subject: [PATCH] Re-enable interrupts before loading PNVM.
5+
6+
For cards in the AX210+ family that advertise a SKU and try to load a PNVM,
7+
in the non-MSIX (MSI) case the normal firmware load flow disables all interrupts
8+
from the card except ALIVE and RX. This is primarily to enforce the driver's
9+
assumption that we will not receive RF_KILL before the firmware has finished
10+
loading, or else an unintelligible error is dumped.
11+
12+
This unfortunately also prevents us from responding to an interrupt from the
13+
card after 'kicking the doorbell' (UREG_DOORBELL_TO_ISR6_PNVM). We therefore
14+
wait until the specified timeout and report "Timeout waiting for PNVM load!"
15+
and fail out of driver initialization.
16+
17+
This patch re-enables interrupts prior to loading the PNVM so we can respond
18+
properly when the card notifies us of a successful PNVM load. Since the FW is
19+
technically 'ALIVE' at this point, it should be ok to also re-enable RF_KILL.
20+
---
21+
drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 9 +++++++++
22+
1 file changed, 9 insertions(+)
23+
24+
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
25+
index f041e77af059..ec982ddce196 100644
26+
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
27+
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
28+
@@ -404,6 +404,15 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,
29+
return -EIO;
30+
}
31+
32+
+ /*
33+
+ * re-enable interrupts so we can get a response from
34+
+ * the card when kicking the doorbell during pnvm load.
35+
+ * This is only needed in the non-msix case. FW is
36+
+ * technically alive at this point so re-enabling rf-kill
37+
+ * interrupt is probably ok.
38+
+ */
39+
+ iwl_trans_interrupts(mvm->trans, true);
40+
+
41+
ret = iwl_pnvm_load(mvm->trans, &mvm->notif_wait);
42+
if (ret) {
43+
IWL_ERR(mvm, "Timeout waiting for PNVM load!\n");
44+
--
45+
2.35.3
46+

kernel.spec.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ Patch21: v6-ACPI-skip-IRQ-override-on-AMD-Zen-platforms.patch
146146
Patch22: 0001-xen-blkback-Advertise-feature-persistent-as-user-req.patch
147147
Patch23: 0002-xen-blkfront-Advertise-feature-persistent-as-user-re.patch
148148
Patch24: 0003-xen-blkfront-Cache-feature_persistent-value-before-a.patch
149+
Patch25: 0001-Re-enable-interrupts-before-loading-PNVM.patch
149150

150151
%description
151152
Qubes Dom0 kernel.

0 commit comments

Comments
 (0)