@@ -202,6 +202,14 @@ static void pci_irq_unmask_msix(struct i
pci_msix_unmask(irq_data_get_msi_desc(data));
}
+static void pci_msix_prepare_desc(struct irq_domain *domain, msi_alloc_info_t *arg,
+ struct msi_desc *desc)
+{
+ /* Don't fiddle with preallocated MSI descriptors */
+ if (!desc->pci.mask_base)
+ msix_prepare_msi_desc(to_pci_dev(desc->dev), desc);
+}
+
static struct msi_domain_template pci_msix_template = {
.chip = {
.name = "PCI-MSIX",
@@ -212,6 +220,7 @@ static struct msi_domain_template pci_ms
},
.ops = {
+ .prepare_desc = pci_msix_prepare_desc,
.set_desc = pci_device_domain_set_desc,
},