Skip to content

Commit

Permalink
firmware: arm_scmi: Clear channel for delayed responses
Browse files Browse the repository at this point in the history
Clear channel properly when done processing a delayed response.
This will let the platform firmware know that the channel is now free to
use it for any new delayed response or notification.

Link: https://lore.kernel.org/r/20200420152315.21008-4-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
(sudeep.holla: Updated commit log to reflect that channel is now free for
 platform to use)
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
  • Loading branch information
Cristian Marussi authored and Sudeep Holla committed Apr 20, 2020
1 parent b37f5cc commit d04fb2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/firmware/arm_scmi/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,12 @@ static void scmi_handle_response(struct scmi_chan_info *cinfo,
xfer->hdr.protocol_id, xfer->hdr.seq,
msg_type);

if (msg_type == MSG_TYPE_DELAYED_RESP)
if (msg_type == MSG_TYPE_DELAYED_RESP) {
info->desc->ops->clear_channel(cinfo);
complete(xfer->async_done);
else
} else {
complete(&xfer->done);
}
}

/**
Expand Down

0 comments on commit d04fb2b

Please sign in to comment.