]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: arm_scmi: Fix response size warning for OPTEE transport
authorVincent Guittot <vincent.guittot@linaro.org>
Fri, 24 Jun 2022 07:45:49 +0000 (09:45 +0200)
committerSudeep Holla <sudeep.holla@arm.com>
Mon, 27 Jun 2022 10:59:24 +0000 (11:59 +0100)
commit678d92ecbdc3667780e3974ae66464b908c44a28
treedc65149ae7646f507eb093d8839365b927bfd2ea
parent1a8d5986c2296e1b0c33784a01ee6a512c6f7dbd
firmware: arm_scmi: Fix response size warning for OPTEE transport

Some protocols check the response size with the expected value but optee
shared memory doesn't return such size whereas it is available in the
optee output buffer.

As an example, the base protocol compares the response size with the
expected result when requesting the list of protocol which triggers a
warning with optee shared memory:

arm-scmi firmware:scmi0: Malformed reply - real_sz:116  calc_sz:4  (loop_num_ret:4)

Save the output buffer length and use it when fetching the answer.

Link: https://lore.kernel.org/r/20220624074549.3298-1-vincent.guittot@linaro.org
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/optee.c