Re: [PATCH v10 08/12] cxl: Reject CXL Reset on multifunction devices

From: Dave Jiang

Date: Tue Aug 25 2026 - 16:32:22 EST




On 8/4/26 12:29 PM, 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>

Reviewed-by: Dave Jiang <dave.jiang@xxxxxxxxx>

> ---
> 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;
> +
> if (probe)
> return 0;
>