summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorWei Hou <wei.hou@scaleflux.com>2026-06-28 23:58:57 +0800
committerDave Jiang <dave.jiang@intel.com>2026-06-29 09:16:50 -0700
commitd79b81893d0cc93737e811a465b9ef9a00156fd5 (patch)
tree737332fc797f6c48b54a15a522ac2ba942609603 /scripts/Makefile.thinlto
parenta667f1eb71a77859af6cedaadfab528256a99ca7 (diff)
downloadlinux-next-d79b81893d0cc93737e811a465b9ef9a00156fd5.tar.gz
linux-next-d79b81893d0cc93737e811a465b9ef9a00156fd5.zip
cxl/pci: Remove incorrect mbox.valid check in cxl_pci_type3_init_mailbox()
The driver's design intent is that missing or malformed component registers should not prevent mailbox initialization. cxl_pci_probe() already reflects this: the CXL_REGLOC_RBI_COMPONENT setup path only emits a dev_warn() and continues when component registers are absent, rather than returning an error. The check 'if (!cxlds->reg_map.device_map.mbox.valid)' violates this intent and is also technically incorrect for two reasons: 1. Wrong struct: the MEMDEV register block is enumerated into a local variable 'map', not into 'cxlds->reg_map'. The device_map.mbox.valid field inside cxlds->reg_map is never written by the MEMDEV probe and will always read as zero regardless of actual hardware capability. 2. Already validated: cxl_pci_setup_regs(CXL_REGLOC_RBI_MEMDEV) calls cxl_probe_regs() which explicitly checks mbox.valid and returns -ENXIO if the mailbox is absent. If that check passes, the mailbox is guaranteed to be present by the time cxl_pci_type3_init_mailbox() is called. The value that the check actually reads is component_map.ras.valid, which aliases device_map.mbox.valid in the union. This is populated by the COMPONENT probe, not the MEMDEV probe. On devices where the component register BAR does not implement a CXL Component Capability Array (e.g. certain DCD devices), cxl_probe_component_regs() returns early leaving ras.valid=false. Through the union, this makes mbox.valid read as false, causing cxl_pci_type3_init_mailbox() to return -ENODEV (-19) even though the mailbox hardware is fully functional. Remove the check. Mailbox presence has already been validated by cxl_pci_setup_regs(CXL_REGLOC_RBI_MEMDEV). The presence or absence of component registers is irrelevant to mailbox initialization. Fixes: 8d8081cecfb9 ("cxl: Move mailbox related bits to the same context") Reviewed-by: Richard Cheng <icheng@nvidia.com> Signed-off-by: Wei Hou <wei.hou@scaleflux.com> Reviewed-by: Li Ming <ming.li@zohomail.com> Link: https://patch.msgid.link/20260628155857.239866-1-wei.hou@scaleflux.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions