linux/drivers/cxl
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
..
core cxl: Explicitly initialize resources when media is not ready 2023-05-26 13:34:39 -07:00
acpi.c Merge branch 'for-6.3/cxl-ram-region' into cxl/next 2023-02-10 18:11:01 -08:00
cxl.h cxl/port: Enable the HDM decoder capability for switch ports 2023-05-18 13:18:49 -07:00
cxlmem.h cxl: Move cxl_await_media_ready() to before capacity info retrieval 2023-05-18 16:43:45 -07:00
cxlpci.h cxl: Wait Memory_Info_Valid before access memory related info 2023-05-18 16:42:41 -07:00
Kconfig Merge branch 'for-6.3/cxl-ram-region' into cxl/next 2023-02-10 18:11:01 -08:00
Makefile cxl/pmem: Introduce nvdimm_security_ops with ->get_flags() operation 2022-11-30 16:30:47 -08:00
mem.c cxl: Move cxl_await_media_ready() to before capacity info retrieval 2023-05-18 16:43:45 -07:00
pci.c cxl: Move cxl_await_media_ready() to before capacity info retrieval 2023-05-18 16:43:45 -07:00
pmem.c cxl/pmem: Fix nvdimm registration races 2023-02-13 17:01:05 -08:00
port.c cxl: Move cxl_await_media_ready() to before capacity info retrieval 2023-05-18 16:43:45 -07:00
security.c cxl/mbox: Enable cxl_mbox_send_cmd() users to validate output size 2022-12-06 14:36:02 -08:00