]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: arm_scmi: Remove clear channel call on the TX channel
authorCristian Marussi <cristian.marussi@arm.com>
Thu, 24 Feb 2022 15:24:04 +0000 (15:24 +0000)
committerSudeep Holla <sudeep.holla@arm.com>
Mon, 4 Apr 2022 07:25:58 +0000 (08:25 +0100)
commit3693f101ed7902264f4d11ab1533030aed9ff2b0
tree528a55b27844662aa99f78a08f93a5f2dc582fdb
parent6d94017b7b59bab528be97be158d0d602982e3a6
firmware: arm_scmi: Remove clear channel call on the TX channel

On SCMI transports whose channels are based on a shared resource the TX
channel area has to be acquired by the agent before placing the desired
command into the channel and it will be then relinquished by the platform
once the related reply has been made available into the channel.
On an RX channel the logic is reversed with the platform acquiring the
channel area and the agent reliquishing it once done by calling the
scmi_clear_channel() helper.

As a consequence, even in case of error, the agent must never try to clear
a TX channel from its side: restrict the existing clear channel call on the
the reply path only to delayed responses since they are indeed coming from
the RX channel.

Link: https://lore.kernel.org/r/20220224152404.12877-1-cristian.marussi@arm.com
Fixes: 07ab0a87d289 ("firmware: arm_scmi: Make .clear_channel optional")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/driver.c