|
@@ -1085,6 +1085,22 @@ int pci_cfg_space_size(struct pci_dev *dev)
|
|
|
|
|
|
#define LEGACY_IO_RESOURCE (IORESOURCE_IO | IORESOURCE_PCI_FIXED)
|
|
#define LEGACY_IO_RESOURCE (IORESOURCE_IO | IORESOURCE_PCI_FIXED)
|
|
|
|
|
|
|
|
+static void pci_msi_setup_pci_dev(struct pci_dev *dev)
|
|
|
|
+{
|
|
|
|
+ /*
|
|
|
|
+ * Disable the MSI hardware to avoid screaming interrupts
|
|
|
|
+ * during boot. This is the power on reset default so
|
|
|
|
+ * usually this should be a noop.
|
|
|
|
+ */
|
|
|
|
+ dev->msi_cap = pci_find_capability(dev, PCI_CAP_ID_MSI);
|
|
|
|
+ if (dev->msi_cap)
|
|
|
|
+ pci_msi_set_enable(dev, 0);
|
|
|
|
+
|
|
|
|
+ dev->msix_cap = pci_find_capability(dev, PCI_CAP_ID_MSIX);
|
|
|
|
+ if (dev->msix_cap)
|
|
|
|
+ pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_ENABLE, 0);
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* pci_setup_device - fill in class and map information of a device
|
|
* pci_setup_device - fill in class and map information of a device
|
|
* @dev: the device structure to fill
|
|
* @dev: the device structure to fill
|
|
@@ -1140,6 +1156,8 @@ int pci_setup_device(struct pci_dev *dev)
|
|
/* "Unknown power state" */
|
|
/* "Unknown power state" */
|
|
dev->current_state = PCI_UNKNOWN;
|
|
dev->current_state = PCI_UNKNOWN;
|
|
|
|
|
|
|
|
+ pci_msi_setup_pci_dev(dev);
|
|
|
|
+
|
|
/* Early fixups, before probing the BARs */
|
|
/* Early fixups, before probing the BARs */
|
|
pci_fixup_device(pci_fixup_early, dev);
|
|
pci_fixup_device(pci_fixup_early, dev);
|
|
/* device class may be changed after fixup */
|
|
/* device class may be changed after fixup */
|