linux-stable/tools/testing/cxl/test
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
..
cxl.c Merge branch 'for-6.3/cxl-rr-emu' into cxl/next 2023-02-14 16:06:10 -08:00
Kbuild cxl/test: Add generic mock events 2023-01-26 16:51:07 -08:00
mem.c cxl: Move cxl_await_media_ready() to before capacity info retrieval 2023-05-18 16:43:45 -07:00
mock.c cxl/port: Enable the HDM decoder capability for switch ports 2023-05-18 13:18:49 -07:00
mock.h cxl/hdm: Create emulated cxl_hdm for devices that do not have HDM decoders 2023-02-14 15:45:21 -08:00