]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cxl/port: Unify endpoint and switch port lookup
authorDan Williams <dan.j.williams@intel.com>
Sat, 31 Jan 2026 00:04:03 +0000 (16:04 -0800)
committerDave Jiang <dave.jiang@intel.com>
Mon, 2 Feb 2026 15:46:33 +0000 (08:46 -0700)
commit2d2b3fe002797c8de2c71236662593bf36de834d
tree210cbc65c41c2395d059f811c070a7cb13840b87
parentdab7162d0ae782295c2c2cff4bb386ee6ae5d566
cxl/port: Unify endpoint and switch port lookup

In support of generic CXL protocol error handling across various 'struct
cxl_port' types, update find_cxl_port_by_uport() to retrieve endpoint CXL
port companions from endpoint PCIe device instances.

The end result is that upstream switch ports and endpoint ports can share
error handling and eventually delete the misplaced cxl_error_handlers from
the cxl_pci class driver.

Reviewed-by: Terry Bowman <terry.bowman@amd.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Tested-by: Terry Bowman <terry.bowman@amd.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20260131000403.2135324-10-dan.j.williams@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/port.c