Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7bb67728 authored by Jeff Hugo's avatar Jeff Hugo Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: glink: Ensure open acks are processed before migration



A race condition between the local and remote sides opening a channel can
cause the local glink to migrate a channel before it should.  Ensure the
open acks have been processed before allowing the channel to migrate to
fix the race.

Change-Id: I61a86eedbf54c66d6028770d1a3069ed995c76ba
Signed-off-by: default avatarJeffrey Hugo <jhugo@codeaurora.org>
parent 028b35cc
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2785,7 +2785,8 @@ static struct channel_ctx *find_l_ctx_get(struct channel_ctx *r_ctx)
			list_for_each_entry(ctx, &xprt->channels,
							port_list_node)
				if (!strcmp(ctx->name, r_ctx->name) &&
							ctx->local_xprt_req) {
							ctx->local_xprt_req &&
							ctx->local_xprt_resp) {
					l_ctx = ctx;
					rwref_get(&l_ctx->ch_state_lhc0);
				}
@@ -2826,7 +2827,8 @@ static struct channel_ctx *find_r_ctx_get(struct channel_ctx *l_ctx)
			list_for_each_entry(ctx, &xprt->channels,
							port_list_node)
				if (!strcmp(ctx->name, l_ctx->name) &&
							ctx->remote_xprt_req) {
							ctx->remote_xprt_req &&
							ctx->remote_xprt_resp) {
					r_ctx = ctx;
					rwref_get(&r_ctx->ch_state_lhc0);
				}