From 551c0d6b736149369eeab2c1840323b5f0ad09fd Mon Sep 17 00:00:00 2001 From: Chaitanya Pratapa Date: Tue, 13 Aug 2019 11:24:19 +0530 Subject: [PATCH] msm: ipa: Fix accessing coal registers when clock is off There is a possibility to access coal registers when the clock is off which results in unknown behavior. Make changes to ensure clock is on when accessing coal registers. Change-Id: Ia13841c5543798cb47ed6953a5c714e7426cb180 Signed-off-by: Chaitanya Pratapa --- drivers/platform/msm/ipa/ipa_v3/ipa_dp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c index 7512220d6643..935d59662bf6 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c @@ -1162,9 +1162,6 @@ int ipa3_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) goto fail_gen3; } - if (!ep->keep_ipa_awake) - IPA_ACTIVE_CLIENTS_DEC_EP(sys_in->client); - IPADBG("client %d (ep: %d) connected sys=%pK\n", sys_in->client, ipa_ep_idx, ep->sys); @@ -1186,6 +1183,9 @@ int ipa3_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) } } + if (!ep->keep_ipa_awake) + IPA_ACTIVE_CLIENTS_DEC_EP(ep->client); + return 0; fail_gen3: