]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:42:14 +0000 (14:42 +0200)
commit51d070bfbf99ae0769b46ba672e4099837fefca6
treef492daca52530ef645b6420749e2519e902c0a92
parent29c7d95245e5c5d2026535434fd0de3f3046c31a
firmware: arm_scmi: Remove clear channel call on the TX channel

BugLink: https://bugs.launchpad.net/bugs/1969857
[ Upstream commit 98f0d68f94ea21541e0050cc64fa108ade779839 ]

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: e9b21c96181c ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/firmware/arm_scmi/driver.c