Skip to content

Commit 20b93a0

Browse files
Artem Shimkosudeep-holla
authored andcommitted
firmware: arm_scmi: Fix premature SCMI_XFER_FLAG_IS_RAW clearing in raw mode
The SCMI_XFER_FLAG_IS_RAW flag was being cleared prematurely in scmi_xfer_raw_put() before the transfer completion was properly acknowledged by the raw message handlers. Move the clearing of SCMI_XFER_FLAG_IS_RAW and SCMI_XFER_FLAG_CHAN_SET from scmi_xfer_raw_put() to __scmi_xfer_put() to ensure the flags remain set throughout the entire raw message processing pipeline until the transfer is returned to the free pool. Fixes: 3095a3e ("firmware: arm_scmi: Add xfer helpers to provide raw access") Suggested-by: Cristian Marussi <[email protected]> Signed-off-by: Artem Shimko <[email protected]> Reviewed-by: Cristian Marussi <[email protected]> Message-Id: <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
1 parent 092b9e2 commit 20b93a0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/firmware/arm_scmi/driver.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,7 @@ __scmi_xfer_put(struct scmi_xfers_info *minfo, struct scmi_xfer *xfer)
805805

806806
scmi_dec_count(info->dbg, XFERS_INFLIGHT);
807807
}
808+
xfer->flags = 0;
808809
hlist_add_head(&xfer->node, &minfo->free_xfers);
809810
}
810811
spin_unlock_irqrestore(&minfo->xfer_lock, flags);
@@ -823,8 +824,6 @@ void scmi_xfer_raw_put(const struct scmi_handle *handle, struct scmi_xfer *xfer)
823824
{
824825
struct scmi_info *info = handle_to_scmi_info(handle);
825826

826-
xfer->flags &= ~SCMI_XFER_FLAG_IS_RAW;
827-
xfer->flags &= ~SCMI_XFER_FLAG_CHAN_SET;
828827
return __scmi_xfer_put(&info->tx_minfo, xfer);
829828
}
830829

0 commit comments

Comments
 (0)