qcacmn: Add WAR to skip status ring entry

STATUS_BUFFER_DONE tlv written in first word for a status
buffer indicates that DMA is done for that status ring entry.

In existing implementation, for a status ring entry if
STATUS_BUFFER_DONE tlv is not written by HW, we poll on to status ring
entry until DMA is done by HW.

During lmac reset it may happnen that HW will not write STATUS_BUFFER_DONE
tlv in status buffer, in that case we end up polling infinitely leading
to backpressure on monitor status ring.

As per MAC team's suggestion, when HP + 1 entry is peeked and if DMA
is not done and if HP + 2 entry's DMA done is set,
replenish HP + 1 entry and start processing in next interrupt.
If HP + 2 entry's DMA done is not set,
poll onto HP + 1 entry DMA done to be set.

CRs-Fixed: 2740988
Change-Id: Ieef667f0bb4a47e74fc320c93243c637409f47f0
This commit is contained in:
Amir
2020-07-29 15:36:24 +05:30
committed by snandini
parent f6f16ac551
commit 376724d4f9
5 changed files with 158 additions and 11 deletions

View File

@@ -219,6 +219,8 @@ enum {
* @dup_mon_linkdesc_cnt: duplicate link descriptor indications from HW
* @dup_mon_buf_cnt: duplicate buffer indications from HW
* @tlv_tag_status_err: status not correct in the tlv tag
* @status_buf_done_war: Number of status ring buffers for which DMA not done
* WAR is applied.
* @mon_rx_bufs_replenished_dest: Rx buffers replenish count
* @mon_rx_bufs_reaped_dest: Rx buffer reap count
* @ppdu_id_mismatch: counter to track ppdu id mismatch in
@@ -248,6 +250,7 @@ struct cdp_pdev_mon_stats {
uint32_t ppdu_id_hist_idx;
uint32_t mon_rx_dest_stuck;
uint32_t tlv_tag_status_err;
uint32_t status_buf_done_war;
uint32_t mon_rx_bufs_replenished_dest;
uint32_t mon_rx_bufs_reaped_dest;
uint32_t ppdu_id_mismatch;