mhi: core: Reorder channel initialization sequence
Enable the local bounce buffer list before the device channel initialization sequence. Change-Id: Ia87698dc83807727f6897356bf9b23f123c53851 Signed-off-by: Andrei Danaila <adanaila@codeaurora.org> Signed-off-by: Tony Truong <truong@codeaurora.org>
This commit is contained in:
parent
d3d1144ee5
commit
dd91a9a03a
1 changed files with 9 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue