OpenCloudOS-Kernel/drivers/firmware/arm_scmi
Cristian Marussi 0cb7af474e firmware: arm_scmi: Reset Rx buffer to max size during async commands
During an async commands execution the Rx buffer length is at first set
to max_msg_sz when the synchronous part of the command is first sent.
However once the synchronous part completes the transport layer waits
for the delayed response which will be processed using the same xfer
descriptor initially allocated. Since synchronous response received at
the end of the xfer will shrink the Rx buffer length to the effective
payload response length, it needs to be reset again.

Raise the Rx buffer length again to max_msg_sz before fetching the
delayed response to ensure full response is read correctly from the
shared memory.

Link: https://lore.kernel.org/r/20210601102421.26581-2-cristian.marussi@arm.com
Fixes: 58ecdf03db ("firmware: arm_scmi: Add support for asynchronous commands and delayed response")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
[sudeep.holla: moved reset to scmi_handle_response as it could race with
               do_xfer_with_response]
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2021-06-02 21:50:12 +01:00
..
Makefile firmware: arm_scmi: Add voltage domain management protocol support 2020-11-20 14:55:48 +00:00
base.c firmware: arm_scmi: Add protocol modularization support 2021-03-30 16:35:16 +01:00
bus.c firmware: arm_scmi: Add dynamic scmi devices creation 2021-03-30 16:35:16 +01:00
clock.c firmware: arm_scmi: Add protocol modularization support 2021-03-30 16:35:16 +01:00
common.h firmware: arm_scmi: Add SMCCC discovery dependency in Kconfig 2021-06-02 11:26:13 +01:00
driver.c firmware: arm_scmi: Reset Rx buffer to max size during async commands 2021-06-02 21:50:12 +01:00
mailbox.c firmware: arm_scmi: Fix NULL pointer dereference in mailbox_chan_free 2020-09-09 10:01:21 +01:00
notify.c firmware: arm_scmi: Rename non devres notify_ops 2021-03-30 16:35:16 +01:00
notify.h firmware: arm_scmi: Cleanup events registration transient code 2021-03-30 16:35:15 +01:00
perf.c firmware: arm_scmi: Add protocol modularization support 2021-03-30 16:35:16 +01:00
power.c firmware: arm_scmi: Add protocol modularization support 2021-03-30 16:35:16 +01:00
reset.c firmware: arm_scmi: Add protocol modularization support 2021-03-30 16:35:16 +01:00
scmi_pm_domain.c firmware: arm_scmi: Add clock management to the SCMI power domain 2021-05-11 16:01:39 +01:00
sensors.c firmware: arm_scmi: Add protocol modularization support 2021-03-30 16:35:16 +01:00
shmem.c firmware: arm_scmi: Rename .clear_notification() transport_ops 2020-04-20 17:25:26 +01:00
smc.c firmware: arm_scmi: Augment SMC/HVC to allow optional interrupt 2021-01-06 09:02:32 +00:00
system.c firmware: arm_scmi: Add protocol modularization support 2021-03-30 16:35:16 +01:00
voltage.c firmware: arm_scmi: Add protocol modularization support 2021-03-30 16:35:16 +01:00