aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cxl/pci.c
diff options
context:
space:
mode:
authorDave Jiang <[email protected]>2025-04-18 00:29:33 +0000
committerDave Jiang <[email protected]>2025-04-18 16:33:04 +0000
commitdc915672f9176799e48ac23a155f48742b15ec6c (patch)
tree90d812e20c7ba153f24b8515528bcd0a3df58f5f /drivers/cxl/pci.c
parentcxl/pci: Drop the parameter is_port of cxl_gpf_get_dvsec() (diff)
downloadkernel-dc915672f9176799e48ac23a155f48742b15ec6c.tar.gz
kernel-dc915672f9176799e48ac23a155f48742b15ec6c.zip
cxl: Fix devm host device for CXL fwctl initialization
Testing revealed the following error message for a CXL memdev that has Feature support: [ 56.690430] cxl mem0: Resources present before probing Attach the allocation of cxl_fwctl to the parent device of cxl_memdev. devm_add_* calls for cxl_memdev should not happen before the memdev probe function or outside the scope of the memdev driver. cxl_test missed this bug because cxl_test always arranges for the cxl_mem driver to be loaded before cxl_mock_mem runs. So the driver core always finds the devres list idle in that case. [DJ: Updated subject title and added commit log suggestion from djbw] Fixes: 858ce2f56b52 ("cxl: Add FWCTL support to CXL") Reviewed-by: Dan Williams <[email protected]> Reviewed-by: Alison Schofield <[email protected]> Link: https://lore.kernel.org/linux-cxl/[email protected]/ Link: https://patch.msgid.link/[email protected] Signed-off-by: Dave Jiang <[email protected]>
Diffstat (limited to 'drivers/cxl/pci.c')
-rw-r--r--drivers/cxl/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
index 7b14a154463c..785aa2af5eaa 100644
--- a/drivers/cxl/pci.c
+++ b/drivers/cxl/pci.c
@@ -1018,7 +1018,7 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
if (rc)
return rc;
- rc = devm_cxl_setup_fwctl(cxlmd);
+ rc = devm_cxl_setup_fwctl(&pdev->dev, cxlmd);
if (rc)
dev_dbg(&pdev->dev, "No CXL FWCTL setup\n");