Re: [PATCH 12/15] cxl/acpi: Skip devm_cxl_port_enumerate_dports() when in RCD mode

From: Robert Richter
Date: Thu Sep 01 2022 - 03:40:58 EST


On 31.08.22 12:58:30, Jonathan Cameron wrote:
> On Wed, 31 Aug 2022 10:16:00 +0200
> Robert Richter <rrichter@xxxxxxx> wrote:

> > +/*
> > + * A parent of an RCH (CXL 1.1 host) is a plain platform device while
> > + * a 2.0 host links to the ACPI0017 root device.
> > + */
> > +static inline bool is_rch_uport(struct cxl_port *port)
> > +{
> > + return is_cxl_port(&port->dev) && !port->dev.parent->fwnode;
>
> I'm not keen on the presence of fwnode being used to distinguish anything.
> That's the sort of thing that gets 'fixed' by later patches.
>
> Can we check something more specific?

We actually know the parent device is the root device, so we can check
this. Even easier.

Thanks,

-Robert