[PATCH 1/1][SRU][OEM-5.17][OEM-6.0] UBUNTU: SAUCE: PCI: vmd: Disable MSI remapping after suspend
AceLan Kao
acelan.kao at canonical.com
Wed Nov 9 10:17:10 UTC 2022
From: Nirmal Patel <nirmal.patel at linux.intel.com>
BugLink: https://launchpad.net/bugs/1996048
MSI remapping is disbaled by VMD driver for intel's icelake and
newer systems in order to improve performance by setting MSI_RMP_DIS
bit. By design MSI_RMP_DIS bit of VMCONFIG registers is cleared.
The same register gets cleared when system is put in S3 power state.
VMD driver needs to set this register again in order to avoid
interrupt issues with devices behind VMD if MSI remapping was
disabled before.
Signed-off-by: Nirmal Patel <nirmal.patel at linux.intel.com>
Reviewed-by: Francisco Munoz <francisco.munoz.ruiz at linux.intel.com>
(cherry picked from commit https://patchwork.kernel.org/project/linux-pci/patch/20221107182735.381552-1-francisco.munoz.ruiz@linux.intel.com/)
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao at canonical.com>
---
drivers/pci/controller/vmd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index 94a14a3d7e55..01a883dad8c6 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -981,6 +981,9 @@ static int vmd_resume(struct device *dev)
struct vmd_dev *vmd = pci_get_drvdata(pdev);
int err, i;
+ if (!vmd->irq_domain)
+ vmd_set_msi_remapping(vmd, false);
+
for (i = 0; i < vmd->msix_count; i++) {
err = devm_request_irq(dev, vmd->irqs[i].virq,
vmd_irq, IRQF_NO_THREAD,
--
2.34.1
More information about the kernel-team
mailing list