linux-stable/drivers/cxl
Dan Williams 36bfc6ad50 cxl/pci: Make cxl_dvsec_ranges() failure not fatal to cxl_pci
cxl_dvsec_ranges(), the helper for enumerating the presence of an active
legacy CXL.mem configuration on a CXL 2.0 Memory Expander, is not fatal
for cxl_pci because there is still value to enable mailbox operations
even if CXL.mem operation is disabled. Recall that the reason cxl_pci
does this initialization and not cxl_mem is to preserve the useful
property (for unit testing) that cxl_mem is cxl_memdev + mmio generic,
and does not require access to a 'struct pci_dev' to issue config
cycles.

Update 'struct cxl_endpoint_dvsec_info' to carry either a positive
number of non-zero size legacy CXL DVSEC ranges, or the negative error
code from __cxl_dvsec_ranges() in its @ranges member.

Reported-by: Krzysztof Zach <krzysztof.zach@intel.com>
Fixes: 560f785590 ("cxl/pci: Retrieve CXL DVSEC memory info")
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Link: https://lore.kernel.org/r/164730735869.3806189.4032428192652531946.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2022-04-12 19:11:58 -07:00
..
core cxl/mbox: Use new return_code handling 2022-04-12 16:07:02 -07:00
acpi.c cxl/core/port: Fix / relax decoder target enumeration 2022-02-08 23:15:10 -08:00
cxl.h cxl/core/port: Add endpoint decoders 2022-02-08 22:57:32 -08:00
cxlmem.h cxl/mbox: Improve handling of mbox_cmd hw return codes 2022-04-12 16:07:02 -07:00
cxlpci.h cxl/pci: Retrieve CXL DVSEC memory info 2022-02-08 22:57:31 -08:00
Kconfig cxl/mem: Add the cxl_mem driver 2022-02-08 22:57:32 -08:00
Makefile cxl/mem: Add the cxl_mem driver 2022-02-08 22:57:32 -08:00
mem.c cxl/mem: Make cxl_dvsec_range() init failure fatal 2022-04-12 19:11:58 -07:00
pci.c cxl/pci: Make cxl_dvsec_ranges() failure not fatal to cxl_pci 2022-04-12 19:11:58 -07:00
pmem.c cxl/pmem: Remove CXL SET_PARTITION_INFO from exclusive_cmds list 2022-04-12 16:07:01 -07:00
port.c cxl/core/port: Add endpoint decoders 2022-02-08 22:57:32 -08:00