[PATCH v16 05/31] firmware: arm_scmi: Add new SCMIv4.0 error codes definitions

From: Cristian Marussi

Date: Sat Nov 21 2026 - 18:43:46 EST


SCMIv4.0 introduces a couple of new possible protocol error codes: add the
needed definitions and mappings to Linux error values.

Note that SCMI_PARTIAL_ERROR has to be handled specially and as such it
needs to be distinguishable but, as of now, all of the available sensible
error codes are already mapped to some other pre-existent SCMI error
condition, so we settled on -EBADMSG which is far from ideal, but at least
kind of captures the nature of the underlying issue.

Reviewed-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxxxxxxxx>
Signed-off-by: Cristian Marussi <cristian.marussi@xxxxxxx>
---
v12 --> v13
- use EBADMSG to map SCMI_PARTIAL_ERROR
v4 --> v5
- map SCMI_ERR_IN_USE to EBUSY as natural
---
drivers/firmware/arm_scmi/errors.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/firmware/arm_scmi/errors.h b/drivers/firmware/arm_scmi/errors.h
index e1b265d5c148..707761cd8d34 100644
--- a/drivers/firmware/arm_scmi/errors.h
+++ b/drivers/firmware/arm_scmi/errors.h
@@ -23,6 +23,8 @@ enum scmi_error_codes {
SCMI_ERR_GENERIC = -8, /* Generic Error */
SCMI_ERR_HARDWARE = -9, /* Hardware Error */
SCMI_ERR_PROTOCOL = -10,/* Protocol Error */
+ SCMI_ERR_IN_USE = -11, /* In Use Error */
+ SCMI_ERR_PARTIAL = -12, /* Partial Error */
};

static const int scmi_linux_errmap[] = {
@@ -38,6 +40,8 @@ static const int scmi_linux_errmap[] = {
-EIO, /* SCMI_ERR_GENERIC */
-EREMOTEIO, /* SCMI_ERR_HARDWARE */
-EPROTO, /* SCMI_ERR_PROTOCOL */
+ -EBUSY, /* SCMI_ERR_IN_USE */
+ -EBADMSG, /* SCMI_ERR_PARTIAL */
};

static inline int scmi_to_linux_errno(int errno)
--
2.54.0