-
-
Notifications
You must be signed in to change notification settings - Fork 63
/
0001-iwlwifi-avoid-writing-to-MSI-X-page-when-MSI-X-is-no.patch
52 lines (44 loc) · 1.85 KB
/
0001-iwlwifi-avoid-writing-to-MSI-X-page-when-MSI-X-is-no.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From cb62c7b33172aa2270608be67b82eb0d2a92195b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
Date: Sat, 29 Jul 2023 15:31:54 +0200
Subject: [PATCH] iwlwifi: avoid writing to MSI-X page when MSI-X is not
enabled
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Xen 4.17 crashes the domain on write to MSI-X page. Upcoming fix for
that coincides with re-enabling MSI-X support with HVM, so before
writing, check if MSI-X is enabled.
This is a temporary hack, not really suitable for upstream submission.
Signed-off-by: Marek Marczykowski-Górecki <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
index fa46dad5fd68..b78539965d59 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
@@ -9,6 +9,8 @@
#include "iwl-context-info-gen3.h"
#include "internal.h"
#include "fw/dbg.h"
+// HACK
+#include "pcie/internal.h"
#define FW_RESET_TIMEOUT (HZ / 5)
@@ -387,7 +389,13 @@ static bool iwl_pcie_set_ltr(struct iwl_trans *trans)
return true;
}
- if (trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_AX210) {
+ /*
+ * Xen 4.17 crashes the domain on write to MSI-X page. Upcoming fix for
+ * that coincides with re-enabling MSI-X support with HVM, so before
+ * writing, check if MSI-X is enabled
+ */
+ if (trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_AX210 &&
+ IWL_TRANS_GET_PCIE_TRANS(trans)->msix_enabled) {
/* First clear the interrupt, just in case */
iwl_write32(trans, CSR_MSIX_HW_INT_CAUSES_AD,
MSIX_HW_INT_CAUSES_REG_IML);
--
2.41.0