OpenCloudOS-Kernel/drivers/cxl/core
Dave Jiang 793a539ac7 cxl: Explicitly initialize resources when media is not ready
When media is not ready do not assume that the capacity information from
the identify command is valid, i.e. ->total_bytes
->partition_align_bytes ->{volatile,persistent}_only_bytes. Explicitly
zero out the capacity resources and exit early.

Given zero-init of those fields this patch is functionally equivalent to
the prior state, but it improves readability and robustness going
forward.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/168506118166.3004974.13523455340007852589.stgit@djiang5-mobl3
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2023-05-26 13:34:39 -07:00
..
Makefile cxl/pci: Move tracepoint definitions to drivers/cxl/core/ 2023-01-04 17:11:11 -08:00
core.h cxl/memdev: Trace inject and clear poison as cxl_poison events 2023-04-23 12:08:39 -07:00
hdm.c cxl/hdm: Add more HDM decoder debug messages at startup 2023-04-18 10:32:47 -07:00
mbox.c cxl: Explicitly initialize resources when media is not ready 2023-05-26 13:34:39 -07:00
memdev.c cxl/memdev: Trace inject and clear poison as cxl_poison events 2023-04-23 12:08:39 -07:00
pci.c cxl: Wait Memory_Info_Valid before access memory related info 2023-05-18 16:42:41 -07:00
pmem.c cxl/port: Fix find_cxl_root() for RCDs and simplify it 2023-04-04 15:34:34 -07:00
port.c cxl/port: Fix NULL pointer access in devm_cxl_add_port() 2023-05-19 17:47:01 -07:00
region.c cxl/region: Provide region info to the cxl_poison trace event 2023-04-23 11:46:06 -07:00
regs.c cxl/regs: Fix sparse warning 2022-12-05 12:33:20 -08:00
suspend.c PM: CXL: Disable suspend 2022-04-22 16:09:42 -07:00
trace.c cxl/trace: Add an HPA to cxl_poison trace events 2023-04-23 11:46:13 -07:00
trace.h cxl/memdev: Trace inject and clear poison as cxl_poison events 2023-04-23 12:08:39 -07:00