Patch "firmware: arm_scmi: Fix xfers allocation on Rx channel" has been added to the 5.15-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: Fix xfers allocation on Rx channel

to the 5.15-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-fix-xfers-allocation-on-rx-channel.patch
and it can be found in the queue-5.15 subdirectory.

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



commit de0f44fe8edc6b7e8abbf9e3e69663d9efdaecf7
Author: Cristian Marussi <cristian.marussi@xxxxxxx>
Date:   Sun Mar 26 21:34:49 2023 +0100

    firmware: arm_scmi: Fix xfers allocation on Rx channel
    
    [ Upstream commit b2ccba9e8cdc6fb3985cc227844e7c6af309ffb1 ]
    
    Two distinct pools of xfer descriptors are allocated at initialization
    time: one (Tx) used to provide xfers to track commands and their replies
    (or delayed replies) and another (Rx) to pick xfers from to be used for
    processing notifications.
    
    Such pools, though, are allocated globally to be used by the whole SCMI
    instance, they are not allocated per-channel and as such the allocation of
    notifications xfers cannot be simply skipped if no Rx channel was found for
    the base protocol common channel, because there could be defined more
    optional per-protocol dedicated channels that instead support Rx channels.
    
    Change the conditional check to skip allocation for the notification pool
    only if no Rx channel has been detected on any per-channel protocol at all.
    
    Fixes: 4ebd8f6dea81 ("firmware: arm_scmi: Add receive buffer support for notifications")
    Signed-off-by: Cristian Marussi <cristian.marussi@xxxxxxx>
    Link: https://lore.kernel.org/r/20230326203449.3492948-1-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 11842497b2261..7ccda7d720a19 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -1463,7 +1463,7 @@ static int scmi_xfer_info_init(struct scmi_info *sinfo)
 		return ret;
 
 	ret = __scmi_xfer_info_init(sinfo, &sinfo->tx_minfo);
-	if (!ret && idr_find(&sinfo->rx_idr, SCMI_PROTOCOL_BASE))
+	if (!ret && !idr_is_empty(&sinfo->rx_idr))
 		ret = __scmi_xfer_info_init(sinfo, &sinfo->rx_minfo);
 
 	return ret;



[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