OSDN Git Service

soc: qcom: glink: Add downvote of transport during SSR
authorDhoat Harpal <hdhoat@codeaurora.org>
Tue, 17 Oct 2017 14:24:17 +0000 (19:54 +0530)
committerDhoat Harpal <hdhoat@codeaurora.org>
Thu, 26 Oct 2017 13:51:44 +0000 (19:21 +0530)
During SSR, down vote transport of xprt is not called.
This leads to transport not being able to go to idle state.

Downvote of transport is called in SSR path.

CRs-Fixed: 2131780
Change-Id: Ic374073187aab95b700aa3f795787819f34d3c3c
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
drivers/soc/qcom/glink.c

index ad9bf3a..b8464fd 100644 (file)
@@ -4294,6 +4294,12 @@ static void glink_core_channel_cleanup(struct glink_core_xprt_ctx *xprt_ptr)
        rwref_read_get(&xprt_ptr->xprt_state_lhb0);
        ctx = get_first_ch_ctx(xprt_ptr);
        while (ctx) {
+               spin_lock_irqsave(&xprt_ptr->tx_ready_lock_lhb3, flags);
+               spin_lock(&ctx->tx_lists_lock_lhc3);
+               if (!list_empty(&ctx->tx_active))
+                       glink_qos_done_ch_tx(ctx);
+               spin_unlock(&ctx->tx_lists_lock_lhc3);
+               spin_unlock_irqrestore(&xprt_ptr->tx_ready_lock_lhb3, flags);
                rwref_write_get_atomic(&ctx->ch_state_lhb2, true);
                if (ctx->local_open_state == GLINK_CHANNEL_OPENED ||
                        ctx->local_open_state == GLINK_CHANNEL_OPENING) {