Patch "firmware: arm_scmi: Remove clear channel call on the TX channel" has been added to the 5.17-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    firmware: arm_scmi: Remove clear channel call on the TX channel

to the 5.17-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     firmware-arm_scmi-remove-clear-channel-call-on-the-t.patch
and it can be found in the queue-5.17 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit cc97174874009b0dec1f068a6df162ac4d34ee52
Author: Cristian Marussi <cristian.marussi@xxxxxxx>
Date:   Thu Feb 24 15:24:04 2022 +0000

    firmware: arm_scmi: Remove clear channel call on the TX channel
    
    [ 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@xxxxxxx
    Fixes: e9b21c96181c ("firmware: arm_scmi: Make .clear_channel optional")
    Signed-off-by: Cristian Marussi <cristian.marussi@xxxxxxx>
    Signed-off-by: Sudeep Holla <sudeep.holla@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index d76bab3aaac4..e815b8f98739 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -652,7 +652,8 @@ static void scmi_handle_response(struct scmi_chan_info *cinfo,
 
 	xfer = scmi_xfer_command_acquire(cinfo, msg_hdr);
 	if (IS_ERR(xfer)) {
-		scmi_clear_channel(info, cinfo);
+		if (MSG_XTRACT_TYPE(msg_hdr) == MSG_TYPE_DELAYED_RESP)
+			scmi_clear_channel(info, cinfo);
 		return;
 	}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux