diff options
| author | Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com> | 2014-02-25 13:16:46 +0530 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-02-26 18:49:01 -0800 |
| commit | b8745e4fd483e44b153cf690d96c978dbc0b63ca (patch) | |
| tree | f3e5b78e3796ebb87d8473c65f8a18d3b9ed0d61 | |
| parent | a5746b5558b0db5dd0e38a4cefda72d85c1d2a46 (diff) | |
qcacld/CE: Fix potential infinite loop in prcoessing Tx completion
It is possible to run into an infinite loop of CE send completion
when doing more send completion. Have threahsold (20) to do
more send completion, once we reach the count break out.
Did a sanity with TC1.
Change-Id: I03601f986ab30c39bb1c7155431dd9b1e82b97b3
CRs-Fixed: 622371
| -rw-r--r-- | CORE/SERVICES/HIF/PCIe/copy_engine.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/CORE/SERVICES/HIF/PCIe/copy_engine.c b/CORE/SERVICES/HIF/PCIe/copy_engine.c index 39d95f6f08c0..0cad06ed597b 100644 --- a/CORE/SERVICES/HIF/PCIe/copy_engine.c +++ b/CORE/SERVICES/HIF/PCIe/copy_engine.c @@ -885,6 +885,7 @@ CE_per_engine_service(struct hif_pci_softc *sc, unsigned int CE_id) unsigned int flags; u_int32_t CE_int_status; unsigned int more_comp_cnt = 0; + unsigned int more_snd_comp_cnt = 0; unsigned int sw_idx, hw_idx; A_TARGET_ACCESS_BEGIN(targid); @@ -1005,7 +1006,15 @@ more_watermarks: } if (CE_state->send_cb && CE_send_entries_done_nolock(sc, CE_state)) { - goto more_completions; + if (more_snd_comp_cnt++ < CE_TXRX_COMP_CHECK_THRESHOLD) { + goto more_completions; + } else { + adf_os_print("%s:Potential infinite loop detected during send completion" + "nentries_mask:0x%x sw read_idx:0x%x hw read_idx:0x%x\n", + __func__, CE_state->src_ring->nentries_mask, + CE_state->src_ring->sw_index, + CE_SRC_RING_READ_IDX_GET(targid, CE_state->ctrl_addr)); + } } |
