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

Commit f57e2660 authored by Ravinder Konka's avatar Ravinder Konka
Browse files

msm: ipa: Fix suspend bit clearing on disconnected pipe



When the USB pipe is getting disconnected there is a possibility
that suspend bit will be cleared due to resource manager. Make
a change to not to clean the suspend bit when pipe disconnection
is in progress.

Change-Id: I97ff3d53c12ed163ae5dbec184ed9445c901459e
Acked-by: default avatarChaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: default avatarRavinder Konka <rkonka@codeaurora.org>
parent 64ac3318
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -661,11 +661,14 @@ int ipa_resume_resource(enum ipa_rm_resource_name resource)
		IPADBG("%d will be resumed on connect.\n", client);
		IPADBG("%d will be resumed on connect.\n", client);
		if (ipa_ctx->ep[ipa_ep_idx].client == client &&
		if (ipa_ctx->ep[ipa_ep_idx].client == client &&
		    ipa_should_pipe_be_suspended(client)) {
		    ipa_should_pipe_be_suspended(client)) {
			if (ipa_ctx->ep[ipa_ep_idx].valid) {
			spin_lock(&ipa_ctx->disconnect_lock);
			if (ipa_ctx->ep[ipa_ep_idx].valid &&
			!ipa_ctx->ep[ipa_ep_idx].disconnect_in_progress) {
				memset(&suspend, 0, sizeof(suspend));
				memset(&suspend, 0, sizeof(suspend));
				suspend.ipa_ep_suspend = false;
				suspend.ipa_ep_suspend = false;
				ipa2_cfg_ep_ctrl(ipa_ep_idx, &suspend);
				ipa2_cfg_ep_ctrl(ipa_ep_idx, &suspend);
			}
			}
			spin_unlock(&ipa_ctx->disconnect_lock);
		}
		}
	}
	}