linux-stable/tools/testing/cxl
Dave Jiang e764f12208 cxl: Move cxl_await_media_ready() to before capacity info retrieval
Move cxl_await_media_ready() to cxl_pci probe before driver starts issuing
IDENTIFY and retrieving memory device information to ensure that the
device is ready to provide the information. Allow cxl_pci_probe() to succeed
even if media is not ready. Cache the media failure in cxlds and don't ask
the device for any media information.

The rationale for proceeding in the !media_ready case is to allow for
mailbox operations to interrogate and/or remediate the device. After
media is repaired then rebinding the cxl_pci driver is expected to
restart the capacity scan.

Suggested-by: Dan Williams <dan.j.williams@intel.com>
Fixes: b39cb1052a ("cxl/mem: Register CXL memX devices")
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/168445310026.3251520.8124296540679268206.stgit@djiang5-mobl3
[djbw: fixup cxl_test]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2023-05-18 16:43:45 -07:00
..
test cxl: Move cxl_await_media_ready() to before capacity info retrieval 2023-05-18 16:43:45 -07:00
config_check.c tools/testing/cxl: Require CONFIG_DEBUG_FS 2023-04-23 12:08:39 -07:00
cxl_acpi_test.c tools/testing/cxl: Prevent cxl_test from confusing production modules 2023-01-05 15:01:45 -08:00
cxl_core_test.c tools/testing/cxl: Prevent cxl_test from confusing production modules 2023-01-05 15:01:45 -08:00
cxl_mem_test.c tools/testing/cxl: Prevent cxl_test from confusing production modules 2023-01-05 15:01:45 -08:00
cxl_pmem_test.c tools/testing/cxl: Prevent cxl_test from confusing production modules 2023-01-05 15:01:45 -08:00
cxl_port_test.c tools/testing/cxl: Prevent cxl_test from confusing production modules 2023-01-05 15:01:45 -08:00
Kbuild cxl/port: Enable the HDM decoder capability for switch ports 2023-05-18 13:18:49 -07:00
mock_acpi.c cxl/core: Generalize dport enumeration in the core 2022-02-08 22:57:30 -08:00
watermark.h tools/testing/cxl: Prevent cxl_test from confusing production modules 2023-01-05 15:01:45 -08:00