qcacmn: Add a check for target_type for accessing CE legacy registers

In ce_services, check if target type is srng based and access legacy registers
only if it is not, for APIs which are common between legacy and srng-based
targets

Change-Id: I515026cd9b6d14accd4c219c6d03134a36cc3db6
This commit is contained in:
Pamidipati, Vijay
2017-06-01 07:34:51 +05:30
committed by snandini
parent 9c9a2871a7
commit 84e3394a3c

View File

@@ -2106,14 +2106,17 @@ more_watermarks:
more_comp_cnt++ < CE_TXRX_COMP_CHECK_THRESHOLD) { more_comp_cnt++ < CE_TXRX_COMP_CHECK_THRESHOLD) {
goto more_completions; goto more_completions;
} else { } else {
if (!ce_srng_based(scn)) {
HIF_ERROR( HIF_ERROR(
"%s:Potential infinite loop detected during Rx processing nentries_mask:0x%x sw read_idx:0x%x hw read_idx:0x%x", "%s:Potential infinite loop detected during Rx processing nentries_mask:0x%x sw read_idx:0x%x hw read_idx:0x%x",
__func__, CE_state->dest_ring->nentries_mask, __func__,
CE_state->dest_ring->nentries_mask,
CE_state->dest_ring->sw_index, CE_state->dest_ring->sw_index,
CE_DEST_RING_READ_IDX_GET(scn, CE_DEST_RING_READ_IDX_GET(scn,
CE_state->ctrl_addr)); CE_state->ctrl_addr));
} }
} }
}
if (CE_state->send_cb && if (CE_state->send_cb &&
hif_state->ce_services->ce_send_entries_done_nolock(scn, hif_state->ce_services->ce_send_entries_done_nolock(scn,
@@ -2122,14 +2125,17 @@ more_watermarks:
more_snd_comp_cnt++ < CE_TXRX_COMP_CHECK_THRESHOLD) { more_snd_comp_cnt++ < CE_TXRX_COMP_CHECK_THRESHOLD) {
goto more_completions; goto more_completions;
} else { } else {
if (!ce_srng_based(scn)) {
HIF_ERROR( HIF_ERROR(
"%s:Potential infinite loop detected during send completion nentries_mask:0x%x sw read_idx:0x%x hw read_idx:0x%x", "%s:Potential infinite loop detected during send completion nentries_mask:0x%x sw read_idx:0x%x hw read_idx:0x%x",
__func__, CE_state->src_ring->nentries_mask, __func__,
CE_state->src_ring->nentries_mask,
CE_state->src_ring->sw_index, CE_state->src_ring->sw_index,
CE_SRC_RING_READ_IDX_GET(scn, CE_SRC_RING_READ_IDX_GET(scn,
CE_state->ctrl_addr)); CE_state->ctrl_addr));
} }
} }
}
if (CE_state->misc_cbs && CE_state->watermark_cb) { if (CE_state->misc_cbs && CE_state->watermark_cb) {
if (hif_state->ce_services->watermark_int(CE_state, &flags)) if (hif_state->ce_services->watermark_int(CE_state, &flags))