Skip to content
Snippets Groups Projects
Commit d6fed164 authored by Peng Fan's avatar Peng Fan Committed by Frieder Schrempf
Browse files

firmware: arm_scmi: imx: Correct tx size of scmi_imx_misc_ctrl_set


[ Upstream commit ab027c488fc4a1fff0a5b712d4bdb2d2d324e8f8 ]

'struct scmi_imx_misc_ctrl_set_in' has a zero length array in the end,
The sizeof will not count 'value[]', and hence Tx size will be smaller
than actual size for Tx,and SCMI firmware will flag this as protocol
error.

Fix this by enlarge the Tx size with 'num * sizeof(__le32)' to count in
the size of data.

Fixes: 61c9f03e ("firmware: arm_scmi: Add initial support for i.MX MISC protocol")
Reviewed-by: default avatarJacky Bai <ping.bai@nxp.com>
Tested-by: default avatarShengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: default avatarJason Liu <jason.hui.liu@nxp.com>
Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
Message-Id: <20250123063441.392555-1-peng.fan@oss.nxp.com>
(sudeep.holla: Commit rewording and replace hardcoded sizeof(__le32) value)
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ed6cb70f
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment