msm: ipa3: Fix IPA aggregation force close call

Core IPA driver passes wrong end-point index to HAL
when generating aggregation force close parameters
values. Fixed the call to pass the correct index.

CRs-Fixed: 2082839
Change-Id: Icc0fd2ce8a23bf0e3334f54b27b850ebf92b58a1
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
This commit is contained in:
Ghanim Fodi 2017-08-07 11:40:58 +03:00 committed by Gerrit - the friendly Code Review server
parent 58274ed8f1
commit 4858b46db0
2 changed files with 6 additions and 1 deletions

View file

@ -2861,7 +2861,7 @@ static int ipa3_tag_generate_force_close_desc(struct ipa3_desc desc[],
IPAHAL_FULL_PIPELINE_CLEAR;
reg_write_agg_close.offset =
ipahal_get_reg_ofst(IPA_AGGR_FORCE_CLOSE);
ipahal_get_aggr_force_close_valmask(1<<i, &valmask);
ipahal_get_aggr_force_close_valmask(i, &valmask);
reg_write_agg_close.value = valmask.val;
reg_write_agg_close.value_mask = valmask.mask;
cmd_pyld = ipahal_construct_imm_cmd(IPA_IMM_CMD_REGISTER_WRITE,

View file

@ -1576,6 +1576,11 @@ void ipahal_get_aggr_force_close_valmask(int ep_idx,
IPA_AGGR_FORCE_CLOSE_AGGR_FORCE_CLOSE_PIPE_BITMAP_BMSK_V3_5;
}
if (ep_idx > (sizeof(valmask->val) * 8 - 1)) {
IPAHAL_ERR("too big ep_idx %d\n", ep_idx);
ipa_assert();
return;
}
IPA_SETFIELD_IN_REG(valmask->val, 1 << ep_idx, shft, bmsk);
valmask->mask = bmsk << shft;
}