Re: [PATCH 12/17] i3c: mipi-i3c-hci: Fix Response Descriptor DATA_LENGTH mask
From: Frank Li
Date: Mon Sep 14 2026 - 14:16:13 EST
On Mon, Sep 14, 2026 at 02:29:58PM +0300, Adrian Hunter wrote:
i3c: mipi-i3c-hci: Correct RESP_DATA_LENGTH to bits 15:0
Frank
> 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>
> ---
> 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
>