Skip to content

Commit f279d0b

Browse files
Davidlohr Buesodjbw
authored andcommitted
cxl/pci: Allocate irq vectors earlier during probe
Move the cxl_alloc_irq_vectors() call further up in the probing in order to allow for mailbox interrupt usage. No change in semantics. Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://lore.kernel.org/r/20230523170927.20685-3-dave@stgolabs.net Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent f6239d3 commit f279d0b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/cxl/pci.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,10 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
714714
else
715715
dev_warn(&pdev->dev, "Media not active (%d)\n", rc);
716716

717+
rc = cxl_alloc_irq_vectors(pdev);
718+
if (rc)
719+
return rc;
720+
717721
rc = cxl_pci_setup_mailbox(cxlds);
718722
if (rc)
719723
return rc;
@@ -738,10 +742,6 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
738742
if (rc)
739743
return rc;
740744

741-
rc = cxl_alloc_irq_vectors(pdev);
742-
if (rc)
743-
return rc;
744-
745745
cxlmd = devm_cxl_add_memdev(cxlds);
746746
if (IS_ERR(cxlmd))
747747
return PTR_ERR(cxlmd);

0 commit comments

Comments
 (0)