From: Davidlohr Bueso Date: Tue, 23 May 2023 17:09:25 +0000 (-0700) Subject: cxl/pci: Allocate irq vectors earlier during probe X-Git-Tag: v6.5-rc1~95^2~6^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f279d0bc13505a25a8b6a307b806312116c2efd2;p=thirdparty%2Flinux.git 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 Reviewed-by: Jonathan Cameron Signed-off-by: Davidlohr Bueso Link: https://lore.kernel.org/r/20230523170927.20685-3-dave@stgolabs.net Signed-off-by: Dan Williams --- diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index 0872f2233ed0c..f2039fe0805d8 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);