summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/soc/qcom/glink.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/soc/qcom/glink.c b/drivers/soc/qcom/glink.c
index 8c3940b631f3..904953877443 100644
--- a/drivers/soc/qcom/glink.c
+++ b/drivers/soc/qcom/glink.c
@@ -4305,6 +4305,10 @@ static bool will_migrate(struct channel_ctx *l_ctx, struct channel_ctx *r_ctx)
if (l_ctx->local_xprt_req > r_ctx->transport_ptr->id)
l_ctx->local_xprt_req = r_ctx->transport_ptr->id;
+ if (ch_is_fully_opened(l_ctx) &&
+ (l_ctx->transport_ptr->id == l_ctx->local_xprt_req))
+ goto exit;
+
new_xprt = max(l_ctx->local_xprt_req, r_ctx->remote_xprt_req);
if (new_xprt == l_ctx->transport_ptr->id)
@@ -4355,6 +4359,12 @@ static bool ch_migrate(struct channel_ctx *l_ctx, struct channel_ctx *r_ctx)
rwref_put(&r_ctx->ch_state_lhb2);
return migrated;
}
+ if (ch_is_fully_opened(l_ctx) &&
+ (l_ctx->transport_ptr->id == l_ctx->local_xprt_req)) {
+ rwref_put(&l_ctx->ch_state_lhb2);
+ rwref_put(&r_ctx->ch_state_lhb2);
+ return migrated;
+ }
if (l_ctx->local_xprt_req == r_ctx->remote_xprt_req &&
l_ctx->local_xprt_req == l_ctx->transport_ptr->id)