[<prev] [next>] [day] [month] [year] [list]
Message-ID: <163948488529.23020.12461686869161043299.tip-bot2@tip-bot2>
Date: Tue, 14 Dec 2021 12:28:05 -0000
From: "tip-bot2 for Thomas Gleixner" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Stefan Roese <sr@...x.de>, Thomas Gleixner <tglx@...utronix.de>,
linux-pci@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
Michal Simek <michal.simek@...inx.com>,
Marek Vasut <marex@...x.de>, stable@...r.kernel.org,
x86@...nel.org, linux-kernel@...r.kernel.org, maz@...nel.org
Subject: [tip: irq/urgent] PCI/MSI: Clear PCI_MSIX_FLAGS_MASKALL on error
The following commit has been merged into the irq/urgent branch of tip:
Commit-ID: 94185adbfad56815c2c8401e16d81bdb74a79201
Gitweb: https://git.kernel.org/tip/94185adbfad56815c2c8401e16d81bdb74a79201
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Tue, 14 Dec 2021 12:42:14 +01:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Tue, 14 Dec 2021 13:23:32 +01:00
PCI/MSI: Clear PCI_MSIX_FLAGS_MASKALL on error
PCI_MSIX_FLAGS_MASKALL is set in the MSI-X control register at MSI-X
interrupt setup time. It's cleared on success, but the error handling path
only clears the PCI_MSIX_FLAGS_ENABLE bit.
That's incorrect as the reset state of the PCI_MSIX_FLAGS_MASKALL bit is
zero. That can be observed via lspci:
Capabilities: [b0] MSI-X: Enable- Count=67 Masked+
Clear the bit in the error path to restore the reset state.
Fixes: 438553958ba1 ("PCI/MSI: Enable and mask MSI-X early")
Reported-by: Stefan Roese <sr@...x.de>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Tested-by: Stefan Roese <sr@...x.de>
Cc: linux-pci@...r.kernel.org
Cc: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Michal Simek <michal.simek@...inx.com>
Cc: Marek Vasut <marex@...x.de>
Cc: stable@...r.kernel.org
Link: https://lore.kernel.org/r/87tufevoqx.ffs@tglx
---
drivers/pci/msi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 6748cf9..d84cf30 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -784,7 +784,7 @@ out_free:
free_msi_irqs(dev);
out_disable:
- pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_ENABLE, 0);
+ pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_MASKALL | PCI_MSIX_FLAGS_ENABLE, 0);
return ret;
}
Powered by blists - more mailing lists