diff options
author | Dave Jiang <dave.jiang@intel.com> | 2023-10-12 11:53:48 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2023-10-27 20:48:02 -0700 |
commit | 8358e8f1596b0b23d3bbc4cf5df5e5e55afc0122 (patch) | |
tree | 51a0119f18795d5020a62a16368c4b49e4223f7d /drivers/cxl/port.c | |
parent | 670e4e88f3b1a88a5a089be329b95c51592973ee (diff) |
cxl: Add support for reading CXL switch CDAT table
Add read_cdat_data() call in cxl_switch_port_probe() to allow
reading of CDAT data for CXL switches. read_cdat_data() needs
to be adjusted for the retrieving of the PCIe device depending
on if the passed in port is endpoint or switch.
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/169713682855.2205276.6418370379144967443.stgit@djiang5-mobl3
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/cxl/port.c')
-rw-r--r-- | drivers/cxl/port.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/cxl/port.c b/drivers/cxl/port.c index 6240e05b9542..47bc8e0b8590 100644 --- a/drivers/cxl/port.c +++ b/drivers/cxl/port.c @@ -62,6 +62,9 @@ static int cxl_switch_port_probe(struct cxl_port *port) struct cxl_hdm *cxlhdm; int rc; + /* Cache the data early to ensure is_visible() works */ + read_cdat_data(port); + rc = devm_cxl_port_enumerate_dports(port); if (rc < 0) return rc; |