qcacmn: Fix REO entry potential overwrite issue

Host SW should not update the cached TP pointer to HW register before
current cached TP REO entry finishes processing, otherwise there is
risk if HW HP catches up to this cached TP, but HW TP value has been
updated to (cached TP + one entry size) now, this TP REO entry might
be overwritten.

Refine it and only update TP pointer to HW when entry processing has done.

Change-Id: I54df3247745717855a67649f440c606c518efd61
CRs-Fixed: 2391658
This commit is contained in:
Jinwei Chen
2019-02-12 12:36:10 +08:00
committed by nshrivas
parent 0c6d9b91f7
commit 1cb78177e6
2 changed files with 12 additions and 10 deletions

View File

@@ -651,7 +651,7 @@ static inline uint32_t hal_srng_dst_num_valid(void *hal_soc, void *hal_ring,
uint32_t tp = srng->u.dst_ring.tp;
if (sync_hw_ptr) {
hp = *(srng->u.dst_ring.hp_addr);
hp = *(volatile uint32_t *)(srng->u.dst_ring.hp_addr);
srng->u.dst_ring.cached_hp = hp;
} else {
hp = srng->u.dst_ring.cached_hp;