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

Commit 4f07db43 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: Fix to polling mode"

parents 434b45a6 ba0235ef
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -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) {
+13 −5
Original line number Diff line number Diff line
@@ -861,12 +861,11 @@ static void ipa3_rx_switch_to_intr_mode(struct ipa3_sys_context *sys)
{
	int ret;

	if (ipa3_ctx->transport_prototype == IPA_TRANSPORT_TYPE_GSI) {
		if (!atomic_read(&sys->curr_polling_state)) {
			IPAERR("already in intr mode\n");
			goto fail;
		}

	if (ipa3_ctx->transport_prototype == IPA_TRANSPORT_TYPE_GSI) {
		atomic_set(&sys->curr_polling_state, 0);
		ipa3_dec_release_wakelock();
		ret = gsi_config_channel_mode(sys->ep->gsi_chan_hdl,
@@ -881,6 +880,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) {