Loading drivers/platform/msm/mhi_dev/mhi.c +33 −16 Original line number Diff line number Diff line Loading @@ -1940,12 +1940,7 @@ static int mhi_dev_process_cmd_ring(struct mhi_dev *mhi, mhi_log(MHI_MSG_VERBOSE, "Failed to enable chdb for ch %d\n", ch_id); rc = mhi_dev_send_cmd_comp_event(mhi, MHI_CMD_COMPL_CODE_UNDEFINED); if (rc) mhi_log(MHI_MSG_VERBOSE, "Error with compl event\n"); return rc; goto send_undef_completion_event; } } Loading @@ -1959,12 +1954,7 @@ static int mhi_dev_process_cmd_ring(struct mhi_dev *mhi, if (rc) { mhi_log(MHI_MSG_ERROR, "start ring failed for ch %d\n", ch_id); rc = mhi_dev_send_cmd_comp_event(mhi, MHI_CMD_COMPL_CODE_UNDEFINED); if (rc) mhi_log(MHI_MSG_ERROR, "Error with compl event\n"); return rc; goto send_undef_completion_event; } mhi->ring[mhi->ch_ring_start + ch_id].state = Loading @@ -1990,13 +1980,19 @@ static int mhi_dev_process_cmd_ring(struct mhi_dev *mhi, mhi_log(MHI_MSG_ERROR, "error starting event ring %d\n", mhi->ch_ctx_cache[ch_id].err_indx); return rc; goto send_undef_completion_event; } } mutex_lock(&mhi->ch[ch_id].ch_lock); mhi_dev_alloc_evt_buf_evt_req(mhi, &mhi->ch[ch_id], rc = mhi_dev_alloc_evt_buf_evt_req(mhi, &mhi->ch[ch_id], evt_ring); mutex_unlock(&mhi->ch[ch_id].ch_lock); if (rc) { mhi_log(MHI_MSG_ERROR, "Failed to alloc ereqs for er %d\n", mhi->ch_ctx_cache[ch_id].err_indx); goto send_undef_completion_event; } } if (MHI_USE_DMA(mhi)) Loading @@ -2022,6 +2018,20 @@ static int mhi_dev_process_cmd_ring(struct mhi_dev *mhi, mhi_dev_trigger_cb(ch_id); mhi_uci_chan_state_notify(mhi, ch_id, MHI_STATE_CONNECTED); break; send_undef_completion_event: mhi->ch_ctx_cache[ch_id].ch_state = MHI_DEV_CH_STATE_DISABLED; mhi->ch[ch_id].state = MHI_DEV_CH_UNINT; rc = mhi_dev_send_cmd_comp_event(mhi, MHI_CMD_COMPL_CODE_UNDEFINED); if (rc) mhi_log(MHI_MSG_VERBOSE, "Error with compl event\n"); mhi_dev_mmio_disable_chdb_a7(mhi, ch_id); return rc; case MHI_DEV_RING_EL_STOP: if (ch_id >= HW_CHANNEL_BASE) { rc = mhi_hwc_chcmd(mhi, ch_id, el->generic.type); Loading Loading @@ -3098,13 +3108,20 @@ static int mhi_dev_alloc_evt_buf_evt_req(struct mhi_dev *mhi, /* Allocate event requests */ ch->ereqs = kcalloc(ch->evt_req_size, sizeof(*ch->ereqs), GFP_KERNEL); if (!ch->ereqs) return -ENOMEM; if (!ch->ereqs) { mhi_log(MHI_MSG_ERROR, "Failed to alloc ereqs for Channel %d\n", ch->ch_id); rc = -ENOMEM; goto free_ereqs; } /* Allocate buffers to queue transfer completion events */ ch->tr_events = kcalloc(ch->evt_buf_size, sizeof(*ch->tr_events), GFP_KERNEL); if (!ch->tr_events) { mhi_log(MHI_MSG_ERROR, "Failed to alloc tr_events buffer for Channel %d\n", ch->ch_id); rc = -ENOMEM; goto free_ereqs; } Loading drivers/platform/msm/mhi_dev/mhi_uci.c +3 −3 Original line number Diff line number Diff line Loading @@ -651,7 +651,7 @@ static int mhi_uci_send_async(struct uci_client *uci_handle, int bytes_to_write; struct mhi_req *ureq; uci_log(UCI_DBG_VERBOSE, uci_log(UCI_DBG_DBG, "Async write for ch %d size %d\n", uci_handle->out_chan, size); Loading Loading @@ -865,7 +865,7 @@ static int mhi_uci_read_async(struct uci_client *uci_handle, int *bytes_avail) struct mhi_req *ureq; struct mhi_dev_client *client_handle; uci_log(UCI_DBG_ERROR, uci_log(UCI_DBG_DBG, "Async read for ch %d\n", uci_handle->in_chan); ureq = mhi_uci_get_req(uci_handle); Loading Loading @@ -1031,7 +1031,7 @@ static int open_client_mhi_channels(struct uci_client *uci_client) uci_ctxt.event_notifier); if (rc < 0) { uci_log(UCI_DBG_ERROR, "Failed to open chan %d, ret 0x%x\n", "Failed to open chan %d, ret %d\n", uci_client->out_chan, rc); goto handle_in_err; } Loading Loading
drivers/platform/msm/mhi_dev/mhi.c +33 −16 Original line number Diff line number Diff line Loading @@ -1940,12 +1940,7 @@ static int mhi_dev_process_cmd_ring(struct mhi_dev *mhi, mhi_log(MHI_MSG_VERBOSE, "Failed to enable chdb for ch %d\n", ch_id); rc = mhi_dev_send_cmd_comp_event(mhi, MHI_CMD_COMPL_CODE_UNDEFINED); if (rc) mhi_log(MHI_MSG_VERBOSE, "Error with compl event\n"); return rc; goto send_undef_completion_event; } } Loading @@ -1959,12 +1954,7 @@ static int mhi_dev_process_cmd_ring(struct mhi_dev *mhi, if (rc) { mhi_log(MHI_MSG_ERROR, "start ring failed for ch %d\n", ch_id); rc = mhi_dev_send_cmd_comp_event(mhi, MHI_CMD_COMPL_CODE_UNDEFINED); if (rc) mhi_log(MHI_MSG_ERROR, "Error with compl event\n"); return rc; goto send_undef_completion_event; } mhi->ring[mhi->ch_ring_start + ch_id].state = Loading @@ -1990,13 +1980,19 @@ static int mhi_dev_process_cmd_ring(struct mhi_dev *mhi, mhi_log(MHI_MSG_ERROR, "error starting event ring %d\n", mhi->ch_ctx_cache[ch_id].err_indx); return rc; goto send_undef_completion_event; } } mutex_lock(&mhi->ch[ch_id].ch_lock); mhi_dev_alloc_evt_buf_evt_req(mhi, &mhi->ch[ch_id], rc = mhi_dev_alloc_evt_buf_evt_req(mhi, &mhi->ch[ch_id], evt_ring); mutex_unlock(&mhi->ch[ch_id].ch_lock); if (rc) { mhi_log(MHI_MSG_ERROR, "Failed to alloc ereqs for er %d\n", mhi->ch_ctx_cache[ch_id].err_indx); goto send_undef_completion_event; } } if (MHI_USE_DMA(mhi)) Loading @@ -2022,6 +2018,20 @@ static int mhi_dev_process_cmd_ring(struct mhi_dev *mhi, mhi_dev_trigger_cb(ch_id); mhi_uci_chan_state_notify(mhi, ch_id, MHI_STATE_CONNECTED); break; send_undef_completion_event: mhi->ch_ctx_cache[ch_id].ch_state = MHI_DEV_CH_STATE_DISABLED; mhi->ch[ch_id].state = MHI_DEV_CH_UNINT; rc = mhi_dev_send_cmd_comp_event(mhi, MHI_CMD_COMPL_CODE_UNDEFINED); if (rc) mhi_log(MHI_MSG_VERBOSE, "Error with compl event\n"); mhi_dev_mmio_disable_chdb_a7(mhi, ch_id); return rc; case MHI_DEV_RING_EL_STOP: if (ch_id >= HW_CHANNEL_BASE) { rc = mhi_hwc_chcmd(mhi, ch_id, el->generic.type); Loading Loading @@ -3098,13 +3108,20 @@ static int mhi_dev_alloc_evt_buf_evt_req(struct mhi_dev *mhi, /* Allocate event requests */ ch->ereqs = kcalloc(ch->evt_req_size, sizeof(*ch->ereqs), GFP_KERNEL); if (!ch->ereqs) return -ENOMEM; if (!ch->ereqs) { mhi_log(MHI_MSG_ERROR, "Failed to alloc ereqs for Channel %d\n", ch->ch_id); rc = -ENOMEM; goto free_ereqs; } /* Allocate buffers to queue transfer completion events */ ch->tr_events = kcalloc(ch->evt_buf_size, sizeof(*ch->tr_events), GFP_KERNEL); if (!ch->tr_events) { mhi_log(MHI_MSG_ERROR, "Failed to alloc tr_events buffer for Channel %d\n", ch->ch_id); rc = -ENOMEM; goto free_ereqs; } Loading
drivers/platform/msm/mhi_dev/mhi_uci.c +3 −3 Original line number Diff line number Diff line Loading @@ -651,7 +651,7 @@ static int mhi_uci_send_async(struct uci_client *uci_handle, int bytes_to_write; struct mhi_req *ureq; uci_log(UCI_DBG_VERBOSE, uci_log(UCI_DBG_DBG, "Async write for ch %d size %d\n", uci_handle->out_chan, size); Loading Loading @@ -865,7 +865,7 @@ static int mhi_uci_read_async(struct uci_client *uci_handle, int *bytes_avail) struct mhi_req *ureq; struct mhi_dev_client *client_handle; uci_log(UCI_DBG_ERROR, uci_log(UCI_DBG_DBG, "Async read for ch %d\n", uci_handle->in_chan); ureq = mhi_uci_get_req(uci_handle); Loading Loading @@ -1031,7 +1031,7 @@ static int open_client_mhi_channels(struct uci_client *uci_client) uci_ctxt.event_notifier); if (rc < 0) { uci_log(UCI_DBG_ERROR, "Failed to open chan %d, ret 0x%x\n", "Failed to open chan %d, ret %d\n", uci_client->out_chan, rc); goto handle_in_err; } Loading