[PATCH v3 1/2] cxl/mbox: Return success for CXL_MBOX_CMD_RC_BACKGROUND

From: Li Ming

Date: Mon Nov 16 2026 - 02:10:24 EST


In CXL subsystem, each mbox command hw return code is mapped to a
corresponding errno value. Currently, CXL_MBOX_CMD_RC_BACKGROUND is
mapped to -ENXIO.

However, per Table-8-208 in CXL r4.0 section 8.2.9.4.5.1, a BACKGROUND
HW return code indicates that the command has been accepted by the
device and continues execution asynchronously. It does not indicate a
command failure.

Return 0 instead of -ENXIO for CXL_MBOX_CMD_RC_BACKGROUND so that
callers do not treat a successfully started background operation as an
error.

Signed-off-by: Li Ming <ming.li@xxxxxxxxxxxx>
Reviewed-by: Davidlohr Bueso <dave@xxxxxxxxxxxx>
---
v3:
- Drop fixes tag.
- Collect review tag.
v2:
- Add a reference to the relevant spec section in the commit log.
---
drivers/cxl/cxlmem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
index c401e3a1af06..cc71d7a84cdc 100644
--- a/drivers/cxl/cxlmem.h
+++ b/drivers/cxl/cxlmem.h
@@ -160,7 +160,7 @@ static inline struct cxl_ep *cxl_ep_load(struct cxl_port *port,
*/
#define CMD_CMD_RC_TABLE \
C(SUCCESS, 0, NULL), \
- C(BACKGROUND, -ENXIO, "background cmd started successfully"), \
+ C(BACKGROUND, 0, "background cmd started successfully"), \
C(INPUT, -ENXIO, "cmd input was invalid"), \
C(UNSUPPORTED, -ENXIO, "cmd is not supported"), \
C(INTERNAL, -ENXIO, "internal device error"), \
--
2.43.0