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

Commit 2dc4a3aa authored by Utkarsh Saxena's avatar Utkarsh Saxena
Browse files

msm: ipa: IPA Disable API fix



As part of IPA disable API, IPA clock enable and disable
should happen irrespective of ep->keep_ipa_awake flag.

Which may result in disabling the IPA clock twice.

Handle failure cases in disable data path and sps pipe reset.

Change-Id: I3644697d2c7eb024aa3f29e3f16b780197d06ce8
CRs-Fixed: 1049137
Acked-by: default avatarMohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: default avatarUtkarsh Saxena <usaxena@codeaurora.org>
parent 816587b4
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -822,7 +822,6 @@ int ipa2_disable_endpoint(u32 clnt_hdl)

	ep = &ipa_ctx->ep[clnt_hdl];
	client_type = ipa2_get_client_mapping(clnt_hdl);
	if (!ep->keep_ipa_awake)
	IPA_ACTIVE_CLIENTS_INC_EP(client_type);

	/* Set Disconnect in Progress flag. */
@@ -840,7 +839,7 @@ int ipa2_disable_endpoint(u32 clnt_hdl)
	if (result) {
		IPAERR("disable data path failed res=%d clnt=%d.\n", result,
				clnt_hdl);
		return -EPERM;
		goto fail;
	}

	if (IPA_CLIENT_IS_CONS(ep->client))
@@ -851,7 +850,7 @@ int ipa2_disable_endpoint(u32 clnt_hdl)
	result = sps_pipe_reset(bam, clnt_hdl);
	if (result) {
		IPAERR("SPS pipe reset failed.\n");
		return -EPERM;
		goto fail;
	}

	ep->ep_disabled = true;
@@ -861,6 +860,10 @@ int ipa2_disable_endpoint(u32 clnt_hdl)
	IPADBG("client (ep: %d) disabled\n", clnt_hdl);

	return 0;

fail:
	IPA_ACTIVE_CLIENTS_DEC_EP(client_type);
	return -EPERM;
}