linux-stable/drivers/cxl/core
Dave Jiang c9e09b070d cxl: Wait Memory_Info_Valid before access memory related info
commit ce17ad0d54 upstream.

The Memory_Info_Valid bit (CXL 3.0 8.1.3.8.2) indicates that the CXL
Range Size High and Size Low registers are valid. The bit must be set
within 1 second of reset deassertion to the device. Check valid bit
before we check the Memory_Active bit when waiting for
cxl_await_media_ready() to ensure that the memory info is valid for
consumption. Also ensures both DVSEC ranges 1 and 2 are ready if DVSEC
Capability indicates they are both supported.

Fixes: 523e594d9c ("cxl/pci: Implement wait for media active")
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/168444687469.3134781.11033518965387297327.stgit@djiang5-mobl3
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-30 14:03:32 +01:00
..
core.h cxl/region: Introduce cxl_pmem_region objects 2022-07-26 12:23:01 -07:00
hdm.c cxl/hdm: Fail upon detecting 0-sized decoders 2023-05-11 23:03:05 +09:00
Makefile cxl/region: Add region creation support 2022-07-21 17:19:25 -07:00
mbox.c cxl/mbox: Add a check on input payload size 2022-10-20 16:28:53 -07:00
memdev.c cxl/mem: Convert partition-info to resources 2022-07-09 19:43:30 -07:00
pci.c cxl: Wait Memory_Info_Valid before access memory related info 2023-05-30 14:03:32 +01:00
pmem.c cxl/pmem: Fix cxl_pmem_region and cxl_memdev leak 2022-11-04 15:58:35 -07:00
port.c cxl/region: Fix 'distance' calculation with passthrough ports 2022-11-04 16:01:24 -07:00
region.c cxl/region: Fix passthrough-decoder detection 2023-02-14 19:11:52 +01:00
regs.c cxl/regs: Fix size of CXL Capability Header Register 2022-02-08 23:15:33 -08:00
suspend.c PM: CXL: Disable suspend 2022-04-22 16:09:42 -07:00