[PATCH V2 12/17] i3c: mipi-i3c-hci: Correct RESP_DATA_LENGTH to bits 15:0

From: Adrian Hunter

Date: Thu Sep 17 2026 - 16:19:55 EST


The I3C HCI Response Descriptor defines DATA_LENGTH in Bits[15:0],
with Bits[23:16] reserved in all published HCI specification versions:
v1.0 (Table 91) and v1.1/v1.2 (Section 8.5). However,
RESP_DATA_LENGTH extracts Bits[21:0], incorrectly including six
reserved bits.

Update the mask to match the defined field width.

No functional change is expected because compliant controllers return
zero in reserved fields.

Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
---


Changes in V2:

Reworded the subject, which was previously "i3c: mipi-i3c-hci:
Fix Response Descriptor DATA_LENGTH mask", to name the macro and
the corrected bit range.


drivers/i3c/master/mipi-i3c-hci/cmd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i3c/master/mipi-i3c-hci/cmd.h b/drivers/i3c/master/mipi-i3c-hci/cmd.h
index 7bada7b4b2de..e0d4a6e0e319 100644
--- a/drivers/i3c/master/mipi-i3c-hci/cmd.h
+++ b/drivers/i3c/master/mipi-i3c-hci/cmd.h
@@ -24,7 +24,7 @@
*/
#define RESP_STATUS(resp) FIELD_GET(GENMASK(31, 28), resp)
#define RESP_TID(resp) FIELD_GET(GENMASK(27, 24), resp)
-#define RESP_DATA_LENGTH(resp) FIELD_GET(GENMASK(21, 0), resp)
+#define RESP_DATA_LENGTH(resp) FIELD_GET(GENMASK(15, 0), resp)

#define RESP_ERR_FIELD GENMASK(31, 28)

--
2.53.0