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

Commit a2e75382 authored by Ashok Vuyyuru's avatar Ashok Vuyyuru Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa3: Update the adpl open state if setup odl pipe fail



If setting up the odl pipe was failed not updating adpl_open
state, because of that during clean up its trying to unconfigure
even setup failed. Add changes to update the adpl_open state
if setup odl pipe failed.

Change-Id: I8d78356f58272008c89c748aa1806aefca5e2e12
Signed-off-by: default avatarAshok Vuyyuru <avuyyuru@codeaurora.org>
parent d32a04d3
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -311,7 +311,7 @@ int ipa_setup_odl_pipe(void)
	ipa_odl_ep_cfg->napi_obj = NULL;
	ipa_odl_ep_cfg->napi_obj = NULL;
	ipa_odl_ep_cfg->desc_fifo_sz = IPA_ODL_RX_RING_SIZE *
	ipa_odl_ep_cfg->desc_fifo_sz = IPA_ODL_RX_RING_SIZE *
						IPA_FIFO_ELEMENT_SIZE;
						IPA_FIFO_ELEMENT_SIZE;

	ipa3_odl_ctx->odl_client_hdl = -1;
	ret = ipa3_setup_sys_pipe(ipa_odl_ep_cfg,
	ret = ipa3_setup_sys_pipe(ipa_odl_ep_cfg,
			&ipa3_odl_ctx->odl_client_hdl);
			&ipa3_odl_ctx->odl_client_hdl);
	return ret;
	return ret;
@@ -336,6 +336,7 @@ int ipa3_odl_pipe_open(void)
	ret = ipa_setup_odl_pipe();
	ret = ipa_setup_odl_pipe();
	if (ret) {
	if (ret) {
		IPAERR(" Setup endpoint config failed\n");
		IPAERR(" Setup endpoint config failed\n");
		ipa3_odl_ctx->odl_state.adpl_open = false;
		goto fail;
		goto fail;
	}
	}
	ipa3_cfg_ep_holb_by_client(IPA_CLIENT_ODL_DPL_CONS, &holb_cfg);
	ipa3_cfg_ep_holb_by_client(IPA_CLIENT_ODL_DPL_CONS, &holb_cfg);
@@ -405,6 +406,7 @@ void ipa3_odl_pipe_cleanup(bool is_ssr)
	ipa3_cfg_ep_holb_by_client(IPA_CLIENT_USB_DPL_CONS, &holb_cfg);
	ipa3_cfg_ep_holb_by_client(IPA_CLIENT_USB_DPL_CONS, &holb_cfg);


	ipa3_teardown_sys_pipe(ipa3_odl_ctx->odl_client_hdl);
	ipa3_teardown_sys_pipe(ipa3_odl_ctx->odl_client_hdl);
	ipa3_odl_ctx->odl_client_hdl = -1;
	/*Assume QTI will never close this node once opened*/
	/*Assume QTI will never close this node once opened*/
	if (ipa_odl_opened)
	if (ipa_odl_opened)
		ipa3_odl_ctx->odl_state.odl_open = true;
		ipa3_odl_ctx->odl_state.odl_open = true;