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

Commit 1ac0f602 authored by Tony Truong's avatar Tony Truong Committed by Gerrit - the friendly Code Review server
Browse files

mhi: core: Reorder channel initialization sequence



Enable the local bounce buffer list before the device
channel initialization sequence.

Change-Id: Ia87698dc83807727f6897356bf9b23f123c53851
Signed-off-by: default avatarAndrei Danaila <adanaila@codeaurora.org>
Signed-off-by: default avatarTony Truong <truong@codeaurora.org>
parent 10731802
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -293,6 +293,13 @@ enum MHI_STATUS mhi_open_channel(struct mhi_client_handle *client_handle)
			chan, mhi_dev_ctxt->dev_exec_env);
		return MHI_STATUS_DEVICE_NOT_READY;
	}
	r = populate_tre_ring(client_handle);
	if (r) {
		mhi_log(MHI_MSG_ERROR,
			"Failed to initialize tre ring chan %d ret %d\n",
			chan, r);
		return r;
	}
	client_handle->event_ring_index =
		mhi_dev_ctxt->dev_space.ring_ctxt.
				cc_list[chan].mhi_event_ring_index;
@@ -302,14 +309,7 @@ enum MHI_STATUS mhi_open_channel(struct mhi_client_handle *client_handle)
		mhi_log(MHI_MSG_ERROR,
			"Failed to initialize bb ctxt chan %d ret %d\n",
			chan, r);
		return r;
	}
	r = populate_tre_ring(client_handle);
	if (r) {
		mhi_log(MHI_MSG_ERROR,
			"Failed to initialize tre ring chan %d ret %d\n",
			chan, r);
		return r;
		return MHI_STATUS_ERROR;
	}

	client_handle->msi_vec =
@@ -423,6 +423,7 @@ void mhi_close_channel(struct mhi_client_handle *client_handle)
	}

	mhi_log(MHI_MSG_INFO, "Freeing ring for chan 0x%x\n", chan);
	free_tre_ring(client_handle);
	mhi_log(MHI_MSG_INFO, "Chan 0x%x confirmed closed.\n", chan);
	client_handle->chan_status = 0;
}