Skip to content

Commit b2ccba9

Browse files
cris-masudeep-holla
authored andcommitted
firmware: arm_scmi: Fix xfers allocation on Rx channel
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: 4ebd8f6 ("firmware: arm_scmi: Add receive buffer support for notifications") Signed-off-by: Cristian Marussi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sudeep Holla <[email protected]>
1 parent d617808 commit b2ccba9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firmware/arm_scmi/driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2289,7 +2289,7 @@ static int scmi_xfer_info_init(struct scmi_info *sinfo)
22892289
return ret;
22902290

22912291
ret = __scmi_xfer_info_init(sinfo, &sinfo->tx_minfo);
2292-
if (!ret && idr_find(&sinfo->rx_idr, SCMI_PROTOCOL_BASE))
2292+
if (!ret && !idr_is_empty(&sinfo->rx_idr))
22932293
ret = __scmi_xfer_info_init(sinfo, &sinfo->rx_minfo);
22942294

22952295
return ret;

0 commit comments

Comments
 (0)