summaryrefslogtreecommitdiffstats
path: root/drivers/cxl/pci.c
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2023-05-23 10:09:25 -0700
committerDan Williams <dan.j.williams@intel.com>2023-05-23 12:55:12 -0700
commitf279d0bc13505a25a8b6a307b806312116c2efd2 (patch)
tree3e3c611d133559f3817d0c3d356cb9eb4ee612b1 /drivers/cxl/pci.c
parentf6239d3f8ce4ebc5a5cfa3657377bd5007ae1547 (diff)
downloadlinux-f279d0bc13505a25a8b6a307b806312116c2efd2.tar.gz
linux-f279d0bc13505a25a8b6a307b806312116c2efd2.tar.bz2
linux-f279d0bc13505a25a8b6a307b806312116c2efd2.zip
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>
Diffstat (limited to 'drivers/cxl/pci.c')
-rw-r--r--drivers/cxl/pci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
index 0872f2233ed0..f2039fe0805d 100644
--- a/drivers/cxl/pci.c
+++ b/drivers/cxl/pci.c
@@ -714,6 +714,10 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
else
dev_warn(&pdev->dev, "Media not active (%d)\n", rc);
+ rc = cxl_alloc_irq_vectors(pdev);
+ if (rc)
+ return rc;
+
rc = cxl_pci_setup_mailbox(cxlds);
if (rc)
return rc;
@@ -738,10 +742,6 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
if (rc)
return rc;
- rc = cxl_alloc_irq_vectors(pdev);
- if (rc)
- return rc;
-
cxlmd = devm_cxl_add_memdev(cxlds);
if (IS_ERR(cxlmd))
return PTR_ERR(cxlmd);