Skip to content

Commit

Permalink
plat-k3: drivers: Add check for host ID as well in ti_sci_get_response
Browse files Browse the repository at this point in the history
It could be helpful in cases where we get response from some different
host that had sent the message before op-tee started but op-tee ended up
receiving the message.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
  • Loading branch information
manorit2001 committed Oct 29, 2024
1 parent 5336f69 commit f21b180
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/arch/arm/plat-k3/drivers/ti_sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ static inline int ti_sci_get_response(struct ti_sci_xfer *xfer)
hdr = (struct ti_sci_msg_hdr *)msg->buf;

/* Sanity check for message response */
if (hdr->seq == message_sequence)
if (hdr->seq == message_sequence && hdr->host == OPTEE_HOST_ID)
break;

IMSG("Message with sequence ID %u is not expected", hdr->seq);
IMSG("Message with sequence ID %u or Host ID %u is not expected",
hdr->seq, hdr->host);
}
if (!retry) {
EMSG("Timed out waiting for message");
Expand Down

0 comments on commit f21b180

Please sign in to comment.