Loading drivers/platform/msm/ipa/ipa_v2/ipa_dp.c +2 −2 Original line number Diff line number Diff line Loading @@ -574,7 +574,7 @@ failure: for (j = 0; j < i; j++) { next_pkt = list_next_entry(tx_pkt, link); list_del(&tx_pkt->link); if (desc[i].type != IPA_DATA_DESC_SKB_PAGED) { if (desc[j].type != IPA_DATA_DESC_SKB_PAGED) { dma_unmap_single(ipa_ctx->pdev, tx_pkt->mem.phys_base, tx_pkt->mem.size, DMA_TO_DEVICE); Loading @@ -586,7 +586,7 @@ failure: kmem_cache_free(ipa_ctx->tx_pkt_wrapper_cache, tx_pkt); tx_pkt = next_pkt; } if (i < num_desc) if (j < num_desc) /* last desc failed */ if (fail_dma_wrap) kmem_cache_free(ipa_ctx->tx_pkt_wrapper_cache, tx_pkt); Loading drivers/platform/msm/ipa/ipa_v2/ipa_rm.c +6 −2 Original line number Diff line number Diff line Loading @@ -994,11 +994,15 @@ void ipa_rm_perf_profile_change(enum ipa_rm_resource_name resource_name) old_volt = ipa_rm_ctx->prof_vote.curr_volt; old_bw = ipa_rm_ctx->prof_vote.curr_bw; if (IPA_RM_RESORCE_IS_PROD(resource_name)) if (IPA_RM_RESORCE_IS_PROD(resource_name)) { bw_ptr = &ipa_rm_ctx->prof_vote.bw_prods[resource_name]; else } else if (IPA_RM_RESORCE_IS_CONS(resource_name)) { bw_ptr = &ipa_rm_ctx->prof_vote.bw_cons[ resource_name - IPA_RM_RESOURCE_PROD_MAX]; } else { IPAERR("Invalid resource_name\n"); return; } switch (resource->state) { case IPA_RM_GRANTED: Loading drivers/platform/msm/ipa/ipa_v2/ipa_uc_wdi.c +9 −0 Original line number Diff line number Diff line Loading @@ -516,6 +516,10 @@ static int ipa_create_uc_smmu_mapping_sgt(struct sg_table *sgt, IPAERR("No SMMU CB setup\n"); return -EINVAL; } if (!sgt) { IPAERR("Bad parameters, scatter / gather list is NULL\n"); return -EINVAL; } for_each_sg(sgt->sgl, sg, sgt->nents, i) { phys = page_to_phys(sg_page(sg)); Loading Loading @@ -603,6 +607,11 @@ static void ipa_save_uc_smmu_mapping_sgt(int res_idx, struct sg_table *sgt, struct scatterlist *sg; unsigned long curr_iova = iova; if (!sgt) { IPAERR("Bad parameters, scatter / gather list is NULL\n"); return; } wdi_res[res_idx].res = kcalloc(sgt->nents, sizeof(struct ipa_wdi_res), GFP_KERNEL); if (!wdi_res[res_idx].res) Loading drivers/platform/msm/ipa/ipa_v3/ipa_dp.c +6 −1 Original line number Diff line number Diff line Loading @@ -92,6 +92,11 @@ static void ipa3_wq_write_done_common(struct ipa3_sys_context *sys, struct ipa3_tx_pkt_wrapper *next_pkt; int i, cnt; if (unlikely(tx_pkt == NULL)) { IPAERR("tx_pkt is NULL\n"); return; } cnt = tx_pkt->cnt; IPADBG_LOW("cnt: %d\n", cnt); for (i = 0; i < cnt; i++) { Loading Loading @@ -640,7 +645,7 @@ failure: kmem_cache_free(ipa3_ctx->tx_pkt_wrapper_cache, tx_pkt); tx_pkt = next_pkt; } if (i < num_desc) if (j < num_desc) /* last desc failed */ if (fail_dma_wrap) kmem_cache_free(ipa3_ctx->tx_pkt_wrapper_cache, tx_pkt); Loading drivers/platform/msm/ipa/ipa_v3/ipa_flt.c +7 −2 Original line number Diff line number Diff line Loading @@ -728,6 +728,11 @@ static bool ipa_flt_valid_lcl_tbl_size(enum ipa_ip_type ipt, { u16 avail; if (!bdy) { IPAERR("Bad parameters, bdy = NULL\n"); return false; } if (ipt == IPA_IP_v4) avail = (rlt == IPA_RULE_HASHABLE) ? IPA_MEM_PART(apps_v4_flt_hash_size) : Loading @@ -737,7 +742,7 @@ static bool ipa_flt_valid_lcl_tbl_size(enum ipa_ip_type ipt, IPA_MEM_PART(apps_v6_flt_hash_size) : IPA_MEM_PART(apps_v6_flt_nhash_size); if (bdy && bdy->size <= avail) if (bdy->size <= avail) return true; IPAERR("tbl too big, needed %d avail %d ipt %d rlt %d\n", Loading Loading
drivers/platform/msm/ipa/ipa_v2/ipa_dp.c +2 −2 Original line number Diff line number Diff line Loading @@ -574,7 +574,7 @@ failure: for (j = 0; j < i; j++) { next_pkt = list_next_entry(tx_pkt, link); list_del(&tx_pkt->link); if (desc[i].type != IPA_DATA_DESC_SKB_PAGED) { if (desc[j].type != IPA_DATA_DESC_SKB_PAGED) { dma_unmap_single(ipa_ctx->pdev, tx_pkt->mem.phys_base, tx_pkt->mem.size, DMA_TO_DEVICE); Loading @@ -586,7 +586,7 @@ failure: kmem_cache_free(ipa_ctx->tx_pkt_wrapper_cache, tx_pkt); tx_pkt = next_pkt; } if (i < num_desc) if (j < num_desc) /* last desc failed */ if (fail_dma_wrap) kmem_cache_free(ipa_ctx->tx_pkt_wrapper_cache, tx_pkt); Loading
drivers/platform/msm/ipa/ipa_v2/ipa_rm.c +6 −2 Original line number Diff line number Diff line Loading @@ -994,11 +994,15 @@ void ipa_rm_perf_profile_change(enum ipa_rm_resource_name resource_name) old_volt = ipa_rm_ctx->prof_vote.curr_volt; old_bw = ipa_rm_ctx->prof_vote.curr_bw; if (IPA_RM_RESORCE_IS_PROD(resource_name)) if (IPA_RM_RESORCE_IS_PROD(resource_name)) { bw_ptr = &ipa_rm_ctx->prof_vote.bw_prods[resource_name]; else } else if (IPA_RM_RESORCE_IS_CONS(resource_name)) { bw_ptr = &ipa_rm_ctx->prof_vote.bw_cons[ resource_name - IPA_RM_RESOURCE_PROD_MAX]; } else { IPAERR("Invalid resource_name\n"); return; } switch (resource->state) { case IPA_RM_GRANTED: Loading
drivers/platform/msm/ipa/ipa_v2/ipa_uc_wdi.c +9 −0 Original line number Diff line number Diff line Loading @@ -516,6 +516,10 @@ static int ipa_create_uc_smmu_mapping_sgt(struct sg_table *sgt, IPAERR("No SMMU CB setup\n"); return -EINVAL; } if (!sgt) { IPAERR("Bad parameters, scatter / gather list is NULL\n"); return -EINVAL; } for_each_sg(sgt->sgl, sg, sgt->nents, i) { phys = page_to_phys(sg_page(sg)); Loading Loading @@ -603,6 +607,11 @@ static void ipa_save_uc_smmu_mapping_sgt(int res_idx, struct sg_table *sgt, struct scatterlist *sg; unsigned long curr_iova = iova; if (!sgt) { IPAERR("Bad parameters, scatter / gather list is NULL\n"); return; } wdi_res[res_idx].res = kcalloc(sgt->nents, sizeof(struct ipa_wdi_res), GFP_KERNEL); if (!wdi_res[res_idx].res) Loading
drivers/platform/msm/ipa/ipa_v3/ipa_dp.c +6 −1 Original line number Diff line number Diff line Loading @@ -92,6 +92,11 @@ static void ipa3_wq_write_done_common(struct ipa3_sys_context *sys, struct ipa3_tx_pkt_wrapper *next_pkt; int i, cnt; if (unlikely(tx_pkt == NULL)) { IPAERR("tx_pkt is NULL\n"); return; } cnt = tx_pkt->cnt; IPADBG_LOW("cnt: %d\n", cnt); for (i = 0; i < cnt; i++) { Loading Loading @@ -640,7 +645,7 @@ failure: kmem_cache_free(ipa3_ctx->tx_pkt_wrapper_cache, tx_pkt); tx_pkt = next_pkt; } if (i < num_desc) if (j < num_desc) /* last desc failed */ if (fail_dma_wrap) kmem_cache_free(ipa3_ctx->tx_pkt_wrapper_cache, tx_pkt); Loading
drivers/platform/msm/ipa/ipa_v3/ipa_flt.c +7 −2 Original line number Diff line number Diff line Loading @@ -728,6 +728,11 @@ static bool ipa_flt_valid_lcl_tbl_size(enum ipa_ip_type ipt, { u16 avail; if (!bdy) { IPAERR("Bad parameters, bdy = NULL\n"); return false; } if (ipt == IPA_IP_v4) avail = (rlt == IPA_RULE_HASHABLE) ? IPA_MEM_PART(apps_v4_flt_hash_size) : Loading @@ -737,7 +742,7 @@ static bool ipa_flt_valid_lcl_tbl_size(enum ipa_ip_type ipt, IPA_MEM_PART(apps_v6_flt_hash_size) : IPA_MEM_PART(apps_v6_flt_nhash_size); if (bdy && bdy->size <= avail) if (bdy->size <= avail) return true; IPAERR("tbl too big, needed %d avail %d ipt %d rlt %d\n", Loading