msm: ipa3: Send enable force clear only for producer pipe

Enable forceclear only supported for producer pipe so
avoid sending the force clear command to consumer pipes.

Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Change-Id: I850f360f18c6598af6914c9cd2c89cacad1ac4c9
This commit is contained in:
Ashok Vuyyuru
2020-10-12 11:24:41 +05:30
parent 1022df8dfa
commit 79aca73c33
3 changed files with 60 additions and 51 deletions

View File

@@ -2638,12 +2638,14 @@ int ipa3_suspend_gsi_wdi_pipe(u32 clnt_hdl)
return -EFAULT; return -EFAULT;
} }
if (ep->valid) { if (ep->valid) {
if (IPA_CLIENT_IS_PROD(ep->client)) {
source_pipe_bitmask = ipahal_get_ep_bit(ipa_ep_idx); source_pipe_bitmask = ipahal_get_ep_bit(ipa_ep_idx);
source_pipe_reg_idx = ipahal_get_ep_reg_idx(ipa_ep_idx); source_pipe_reg_idx = ipahal_get_ep_reg_idx(ipa_ep_idx);
IPADBG("suspended pipe %d\n", ipa_ep_idx); IPADBG("suspended pipe %d\n", ipa_ep_idx);
res = ipa3_enable_force_clear(clnt_hdl, res = ipa3_enable_force_clear(clnt_hdl,
false, source_pipe_bitmask, source_pipe_reg_idx); false, source_pipe_bitmask,
source_pipe_reg_idx);
if (res) { if (res) {
/* /*
* assuming here modem SSR, AP can remove * assuming here modem SSR, AP can remove
@@ -2658,6 +2660,7 @@ int ipa3_suspend_gsi_wdi_pipe(u32 clnt_hdl)
} else { } else {
disable_force_clear = true; disable_force_clear = true;
} }
}
retry_gsi_stop: retry_gsi_stop:
res = ipa3_stop_gsi_channel(ipa_ep_idx); res = ipa3_stop_gsi_channel(ipa_ep_idx);
if (res != 0 && res != -GSI_STATUS_AGAIN && if (res != 0 && res != -GSI_STATUS_AGAIN &&

View File

@@ -879,10 +879,12 @@ int ipa3_disable_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx)
* as IPA uC will fail to suspend the pipe otherwise. * as IPA uC will fail to suspend the pipe otherwise.
*/ */
ep = &ipa3_ctx->ep[ipa_ep_idx_rx]; ep = &ipa3_ctx->ep[ipa_ep_idx_rx];
if (IPA_CLIENT_IS_PROD(ep->client)) {
source_pipe_bitmask = ipahal_get_ep_bit(ipa_ep_idx_rx); source_pipe_bitmask = ipahal_get_ep_bit(ipa_ep_idx_rx);
source_pipe_reg_idx = ipahal_get_ep_reg_idx(ipa_ep_idx_rx); source_pipe_reg_idx = ipahal_get_ep_reg_idx(ipa_ep_idx_rx);
result = ipa3_enable_force_clear(ipa_ep_idx_rx, result = ipa3_enable_force_clear(ipa_ep_idx_rx,
false, source_pipe_bitmask, source_pipe_reg_idx); false, source_pipe_bitmask,
source_pipe_reg_idx);
if (result) { if (result) {
/* /*
* assuming here modem SSR, AP can remove * assuming here modem SSR, AP can remove
@@ -897,6 +899,7 @@ int ipa3_disable_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx)
} else { } else {
disable_force_clear = true; disable_force_clear = true;
} }
}
/* stop gsi rx channel */ /* stop gsi rx channel */
result = ipa3_stop_gsi_channel(ipa_ep_idx_rx); result = ipa3_stop_gsi_channel(ipa_ep_idx_rx);

View File

@@ -1809,10 +1809,12 @@ int ipa3_disable_wigig_pipe_i(enum ipa_client_type client)
} }
IPADBG("pipe %d\n", ipa_ep_idx); IPADBG("pipe %d\n", ipa_ep_idx);
if (IPA_CLIENT_IS_PROD(ep->client)) {
source_pipe_bitmask = ipahal_get_ep_bit(ipa_ep_idx); source_pipe_bitmask = ipahal_get_ep_bit(ipa_ep_idx);
source_pipe_reg_idx = ipahal_get_ep_reg_idx(ipa_ep_idx); source_pipe_reg_idx = ipahal_get_ep_reg_idx(ipa_ep_idx);
res = ipa3_enable_force_clear(ipa_ep_idx, res = ipa3_enable_force_clear(ipa_ep_idx,
false, source_pipe_bitmask, source_pipe_reg_idx); false, source_pipe_bitmask,
source_pipe_reg_idx);
if (res) { if (res) {
/* /*
* assuming here modem SSR, AP can remove * assuming here modem SSR, AP can remove
@@ -1827,6 +1829,7 @@ int ipa3_disable_wigig_pipe_i(enum ipa_client_type client)
} else { } else {
disable_force_clear = true; disable_force_clear = true;
} }
}
retry_gsi_stop: retry_gsi_stop:
res = ipa3_stop_gsi_channel(ipa_ep_idx); res = ipa3_stop_gsi_channel(ipa_ep_idx);
if (res != 0 && res != -GSI_STATUS_AGAIN && if (res != 0 && res != -GSI_STATUS_AGAIN &&