Skip to contentSkip to conversation

PCI: Don't bother PCIe devices with trying to set MWI

PATCH New Heiner Kallweit 1 participant 1 message Dec 8, 2020 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: Don't bother PCIe devices with trying to set MWI

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

---
 drivers/pci/pci.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/pci/pci.c +9 -0
index 9c49b96c2..b7f0883d6 100644
@@ -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;
Signature · 1 line
2.29.2