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

Commit 78cfce9b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: fix multiple issues"

parents 263936e1 8991dfc0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
@@ -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);
+6 −2
Original line number Diff line number Diff line
@@ -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:
+9 −0
Original line number Diff line number Diff line
@@ -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));
@@ -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)
+6 −1
Original line number Diff line number Diff line
@@ -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++) {
@@ -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);
+7 −2
Original line number Diff line number Diff line
@@ -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) :
@@ -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