msm: ipa: Fix to polling mode
When IPA clock is enabled, suspend bit is cleared and if pipe is non-empty EOT is posted internally. At the same time, there is a possibility that SPS driver posts EOT. This can result into incorrect state of polling state and switch to intr mode is tried repeatedly. Make a change to check if we are in intr mode already in addition to the polling state. Change-Id: I1af08605f7d2d234b0e5a4e3c8928db6cff5c7b4 Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com> Signed-off-by: Sridhar Ancha <sancha@codeaurora.org>
This commit is contained in:
parent
c7ff58f93f
commit
01da6d8db6
2 changed files with 25 additions and 10 deletions
|
@ -820,16 +820,23 @@ static void ipa_rx_switch_to_intr_mode(struct ipa_sys_context *sys)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!atomic_read(&sys->curr_polling_state)) {
|
||||
IPAERR("already in intr mode\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = sps_get_config(sys->ep->ep_hdl, &sys->ep->connect);
|
||||
if (ret) {
|
||||
IPAERR("sps_get_config() failed %d\n", ret);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!atomic_read(&sys->curr_polling_state) &&
|
||||
((sys->ep->connect.options & SPS_O_EOT) == SPS_O_EOT)) {
|
||||
IPADBG("already in intr mode\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!atomic_read(&sys->curr_polling_state)) {
|
||||
IPAERR("already in intr mode\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
sys->event.options = SPS_O_EOT;
|
||||
ret = sps_register_event(sys->ep->ep_hdl, &sys->event);
|
||||
if (ret) {
|
||||
|
|
|
@ -882,12 +882,11 @@ static void ipa3_rx_switch_to_intr_mode(struct ipa3_sys_context *sys)
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (!atomic_read(&sys->curr_polling_state)) {
|
||||
IPAERR("already in intr mode\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (ipa3_ctx->transport_prototype == IPA_TRANSPORT_TYPE_GSI) {
|
||||
if (!atomic_read(&sys->curr_polling_state)) {
|
||||
IPAERR("already in intr mode\n");
|
||||
goto fail;
|
||||
}
|
||||
atomic_set(&sys->curr_polling_state, 0);
|
||||
ipa3_dec_release_wakelock();
|
||||
ret = gsi_config_channel_mode(sys->ep->gsi_chan_hdl,
|
||||
|
@ -902,6 +901,15 @@ static void ipa3_rx_switch_to_intr_mode(struct ipa3_sys_context *sys)
|
|||
IPAERR("sps_get_config() failed %d\n", ret);
|
||||
goto fail;
|
||||
}
|
||||
if (!atomic_read(&sys->curr_polling_state) &&
|
||||
((sys->ep->connect.options & SPS_O_EOT) == SPS_O_EOT)) {
|
||||
IPADBG("already in intr mode\n");
|
||||
return;
|
||||
}
|
||||
if (!atomic_read(&sys->curr_polling_state)) {
|
||||
IPAERR("already in intr mode\n");
|
||||
goto fail;
|
||||
}
|
||||
sys->event.options = SPS_O_EOT;
|
||||
ret = sps_register_event(sys->ep->ep_hdl, &sys->event);
|
||||
if (ret) {
|
||||
|
|
Loading…
Add table
Reference in a new issue