1
0
Fork 0
alistair23-linux/drivers/firmware/arm_scmi
Sudeep Holla 6937c143e3 firmware: arm_scmi: Add missing Rx size re-initialisation
[ Upstream commit 9724722fde ]

Few commands provide the list of description partially and require
to be called consecutively until all the descriptors are fetched
completely. In such cases, we don't release the buffers and reuse
them for consecutive transmits.

However, currently we don't reset the Rx size which will be set as
per the response for the last transmit. This may result in incorrect
response size being interpretted as the firmware may repond with size
greater than the one set but we read only upto the size set by previous
response.

Let us reset the receive buffer size to max possible in such cases as
we don't know the exact size of the response.

Link:  https://lore.kernel.org/r/20201012141746.32575-1-sudeep.holla@arm.com
Fixes: b6f20ff8bd ("firmware: arm_scmi: add common infrastructure and support for base protocol")
Reported-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-11-05 11:43:12 +01:00
..
Makefile firmware: arm_scmi: Add RESET protocol in SCMI v2.0 2019-08-12 12:23:02 +01:00
base.c firmware: arm_scmi: Add missing Rx size re-initialisation 2020-11-05 11:43:12 +01:00
bus.c firmware: arm_scmi: Avoid double free in error flow 2020-01-09 10:20:03 +01:00
clock.c firmware: arm_scmi: Add missing Rx size re-initialisation 2020-11-05 11:43:12 +01:00
common.h firmware: arm_scmi: Add missing Rx size re-initialisation 2020-11-05 11:43:12 +01:00
driver.c firmware: arm_scmi: Add missing Rx size re-initialisation 2020-11-05 11:43:12 +01:00
perf.c firmware: arm_scmi: Add missing Rx size re-initialisation 2020-11-05 11:43:12 +01:00
power.c firmware: arm_scmi: Use {get,put}_unaligned_le{32,64} accessors 2019-08-12 12:23:01 +01:00
reset.c firmware: arm_scmi: Fix ARCH_COLD_RESET 2020-11-05 11:43:12 +01:00
scmi_pm_domain.c firmware: arm_scmi: Fix SCMI genpd domain probing 2020-08-19 08:15:55 +02:00
sensors.c firmware: arm_scmi: Add missing Rx size re-initialisation 2020-11-05 11:43:12 +01:00