File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -89,9 +89,21 @@ static int pci_msi_domain_check_cap(struct irq_domain *domain,
89
89
if (pci_msi_desc_is_multi_msi (desc ) &&
90
90
!(info -> flags & MSI_FLAG_MULTI_PCI_MSI ))
91
91
return 1 ;
92
- else if (desc -> pci .msi_attrib .is_msix && !(info -> flags & MSI_FLAG_PCI_MSIX ))
93
- return - ENOTSUPP ;
94
92
93
+ if (desc -> pci .msi_attrib .is_msix ) {
94
+ if (!(info -> flags & MSI_FLAG_PCI_MSIX ))
95
+ return - ENOTSUPP ;
96
+
97
+ if (info -> flags & MSI_FLAG_MSIX_CONTIGUOUS ) {
98
+ unsigned int idx = 0 ;
99
+
100
+ /* Check for gaps in the entry indices */
101
+ for_each_msi_entry (desc , dev ) {
102
+ if (desc -> msi_index != idx ++ )
103
+ return - ENOTSUPP ;
104
+ }
105
+ }
106
+ }
95
107
return 0 ;
96
108
}
97
109
Original file line number Diff line number Diff line change @@ -362,6 +362,8 @@ enum {
362
362
MSI_FLAG_LEVEL_CAPABLE = (1 << 6 ),
363
363
/* Populate sysfs on alloc() and destroy it on free() */
364
364
MSI_FLAG_DEV_SYSFS = (1 << 7 ),
365
+ /* MSI-X entries must be contiguous */
366
+ MSI_FLAG_MSIX_CONTIGUOUS = (1 << 8 ),
365
367
};
366
368
367
369
int msi_domain_set_affinity (struct irq_data * data , const struct cpumask * mask ,
You can’t perform that action at this time.
0 commit comments