@@ -321,27 +321,6 @@ static int msi_quota_for_device(struct pci_dev *dev, int request)
321
321
return request ;
322
322
}
323
323
324
- static int check_msix_entries (struct pci_dev * pdev )
325
- {
326
- struct msi_desc * entry ;
327
- int expected ;
328
-
329
- /* There's no way for us to express to firmware that we want
330
- * a discontiguous, or non-zero based, range of MSI-X entries.
331
- * So we must reject such requests. */
332
-
333
- expected = 0 ;
334
- for_each_pci_msi_entry (entry , pdev ) {
335
- if (entry -> msi_index != expected ) {
336
- pr_debug ("rtas_msi: bad MSI-X entries.\n" );
337
- return - EINVAL ;
338
- }
339
- expected ++ ;
340
- }
341
-
342
- return 0 ;
343
- }
344
-
345
324
static void rtas_hack_32bit_msi_gen2 (struct pci_dev * pdev )
346
325
{
347
326
u32 addr_hi , addr_lo ;
@@ -380,9 +359,6 @@ static int rtas_prepare_msi_irqs(struct pci_dev *pdev, int nvec_in, int type,
380
359
if (quota && quota < nvec )
381
360
return quota ;
382
361
383
- if (type == PCI_CAP_ID_MSIX && check_msix_entries (pdev ))
384
- return - EINVAL ;
385
-
386
362
/*
387
363
* Firmware currently refuse any non power of two allocation
388
364
* so we round up if the quota will allow it.
@@ -529,9 +505,16 @@ static struct irq_chip pseries_pci_msi_irq_chip = {
529
505
.irq_write_msi_msg = pseries_msi_write_msg ,
530
506
};
531
507
508
+
509
+ /*
510
+ * Set MSI_FLAG_MSIX_CONTIGUOUS as there is no way to express to
511
+ * firmware to request a discontiguous or non-zero based range of
512
+ * MSI-X entries. Core code will reject such setup attempts.
513
+ */
532
514
static struct msi_domain_info pseries_msi_domain_info = {
533
515
.flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
534
- MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX ),
516
+ MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX |
517
+ MSI_FLAG_MSIX_CONTIGUOUS ),
535
518
.ops = & pseries_pci_msi_domain_ops ,
536
519
.chip = & pseries_pci_msi_irq_chip ,
537
520
};
0 commit comments