| Message ID | 20260902072804.665639-9-smadhavan@nvidia.com |
|---|---|
| State | New |
| Headers | show |
| Series | PCI/CXL: Add CXL reset support for Type 2 devices | expand |
> 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@nvidia.com> Sashiko has reviewed this patch and found no issues. It looks great!
On Wed, Sep 02, 2026 at 07:28:00AM +0800, 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@nvidia.com> > Reviewed-by: Dave Jiang <dave.jiang@intel.com> > --- > 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 13bd0c3faf7e..79227ce70169 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; > Hmm a PF can have a single-function PCI header while having many enabled VFs, and VFs enablement can change after reset-method probing. Since CXL Reset can affect VFs, do we have the mechanism to quiescie all VF? Best regards, Richard Cheng. > -- > 2.43.0 >
diff --git a/drivers/cxl/core/resource.c b/drivers/cxl/core/resource.c index 13bd0c3faf7e..79227ce70169 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;