Re: [PATCH v10 08/12] cxl: Reject CXL Reset on multifunction devices
From: Lucero Palau, Alejandro
Date: Wed Aug 26 2026 - 14:48:09 EST
On 04/08/2026 20:29, Srirangan Madhavan wrote:
CXL Reset can be exposed as a PCI function reset method only when the
reset is function-scoped. PCI reset-method probing runs during
enumeration, so walking sibling functions there can race with functions
that have not been added to the bus yet.
Reject multifunction devices for now instead of trying to infer reset
scope from sibling state. Systems that can prove a multifunction device
has function-scoped CXL Reset can be enabled later.
Signed-off-by: Srirangan Madhavan <smadhavan@xxxxxxxxxx>
---
drivers/cxl/core/resource.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/cxl/core/resource.c b/drivers/cxl/core/resource.c
index 6d4528f77c53..464ca9bdae05 100644
--- a/drivers/cxl/core/resource.c
+++ b/drivers/cxl/core/resource.c
@@ -979,6 +979,9 @@ int cxl_reset_function(struct pci_dev *pdev, bool probe)
if (dvsec < 0)
return dvsec;
+ if (pdev->multifunction)
+ return -ENOTTY;
+
I think I'm the one to blame for adding this patch after my comment in v9 ... and to blame because I think it is not needed after all.
I thought the reset_method() and the reset() sysfs files would be specifically created for this cxl reset functionality, but they are pci related and will be for any function. Because the check already present in v9 in cxl_reset_dvsec, non-PF0 functions can not have the cxl_reset method, what is good enough. So multipf can be supported and this check removed, as no non-PF0 function can use the potential memdev if PF0 is not using it, what is already ensured in your patchset.
Maybe to add some warning/info when someone tries to configure cxl_reset for a non-PF0 function, like "PF0 owns the CXL functionality".
In any case, apologies for the confusion.
Thanks,
Alejandro.
if (probe)
return 0;