All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: Don't bother PCIe devices with trying to set MWI
@ 2020-12-08 12:16 Heiner Kallweit
  0 siblings, 0 replies; only message in thread
From: Heiner Kallweit @ 2020-12-08 12:16 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci

Don't bother PCIe devices with trying to set MWI.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/pci/pci.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 9c49b96c2..b7f0883d6 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4347,6 +4347,9 @@ int pci_set_mwi(struct pci_dev *dev)
 	int rc;
 	u16 cmd;
 
+	if (pci_is_pcie(dev))
+		return 0;
+
 	rc = pci_set_cacheline_size(dev);
 	if (rc)
 		return rc;
@@ -4374,6 +4377,9 @@ int pcim_set_mwi(struct pci_dev *dev)
 {
 	struct pci_devres *dr;
 
+	if (pci_is_pcie(dev))
+		return 0;
+
 	dr = find_pci_dr(dev);
 	if (!dr)
 		return -ENOMEM;
@@ -4413,6 +4419,9 @@ void pci_clear_mwi(struct pci_dev *dev)
 #ifndef PCI_DISABLE_MWI
 	u16 cmd;
 
+	if (pci_is_pcie(dev))
+		return;
+
 	pci_read_config_word(dev, PCI_COMMAND, &cmd);
 	if (cmd & PCI_COMMAND_INVALIDATE) {
 		cmd &= ~PCI_COMMAND_INVALIDATE;
-- 
2.29.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-08 12:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 12:16 [PATCH] PCI: Don't bother PCIe devices with trying to set MWI Heiner Kallweit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.