Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4369515 authored by Bojun Pan's avatar Bojun Pan Committed by Gerrit - the friendly Code Review server
Browse files

msm: IPA: stop ODL GSI channel when PC happens



In current code, when PC happens, ODL GSI channel is still in started
state, and when new DL packet coming, GSI isr will happens, since
nobody is voting for IPA, GSI will not able to handle this isr and
do a silent return. This sequence is causing the GSI irq storm.

Change-Id: I1b17b83d0dee27b0e2851c6bf96907c66773cc60
Signed-off-by: default avatarBojun Pan <bojunp@codeaurora.org>
parent 9fea721b
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -891,6 +891,11 @@ static void ipa_pm_sys_pipe_cb(void *p, enum ipa_pm_cb_event event)
			usleep_range(SUSPEND_MIN_SLEEP_RX,
			usleep_range(SUSPEND_MIN_SLEEP_RX,
				SUSPEND_MAX_SLEEP_RX);
				SUSPEND_MAX_SLEEP_RX);
			IPA_ACTIVE_CLIENTS_DEC_SPECIAL("PIPE_SUSPEND_LAN");
			IPA_ACTIVE_CLIENTS_DEC_SPECIAL("PIPE_SUSPEND_LAN");
		} else if (sys->ep->client == IPA_CLIENT_ODL_DPL_CONS) {
			IPA_ACTIVE_CLIENTS_INC_SPECIAL("PIPE_SUSPEND_ODL");
			usleep_range(SUSPEND_MIN_SLEEP_RX,
				SUSPEND_MAX_SLEEP_RX);
			IPA_ACTIVE_CLIENTS_DEC_SPECIAL("PIPE_SUSPEND_ODL");
		} else
		} else
			IPAERR("Unexpected event %d\n for client %d\n",
			IPAERR("Unexpected event %d\n for client %d\n",
				event, sys->ep->client);
				event, sys->ep->client);
+43 −0
Original line number Original line Diff line number Diff line
@@ -7295,6 +7295,49 @@ void ipa3_suspend_apps_pipes(bool suspend)
		if (suspend)
		if (suspend)
			ipa3_gsi_poll_after_suspend(ep);
			ipa3_gsi_poll_after_suspend(ep);
	}
	}

	ipa_ep_idx = ipa_get_ep_mapping(IPA_CLIENT_ODL_DPL_CONS);
	/* Considering the case for SSR. */
	if (ipa_ep_idx == -1) {
		IPADBG("Invalid mapping for IPA_CLIENT_ODL_DPL_CONS\n");
		return;
	}
	ep = &ipa3_ctx->ep[ipa_ep_idx];
	if (ep->valid) {
		IPADBG("%s pipe %d\n", suspend ? "suspend" : "unsuspend",
			ipa_ep_idx);
		/*
		 * move the channel to callback mode.
		 * This needs to happen before starting the channel to make
		 * sure we don't loose any interrupt
		 */
		if (!suspend && !atomic_read(&ep->sys->curr_polling_state))
			gsi_config_channel_mode(ep->gsi_chan_hdl,
			GSI_CHAN_MODE_CALLBACK);
		if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_0) {
			if (suspend) {
				res = __ipa3_stop_gsi_channel(ipa_ep_idx);
				if (res) {
					IPAERR("failed to stop ODL channel\n");
					ipa_assert();
				}
			} else if (!atomic_read(&ipa3_ctx->is_ssr)) {
				/* If SSR was alreday started not required to
				 * start WAN channel,Because in SSR will stop
				 * channel and reset the channel.
				 */
				res = gsi_start_channel(ep->gsi_chan_hdl);
				if (res) {
					IPAERR("failed to start ODL channel\n");
					ipa_assert();
				}
			}
		} else {
			ipa3_cfg_ep_ctrl(ipa_ep_idx, &cfg);
		}
		if (suspend)
			ipa3_gsi_poll_after_suspend(ep);
	}
}
}


int ipa3_allocate_dma_task_for_gsi(void)
int ipa3_allocate_dma_task_for_gsi(void)