qcacmn: Add TX completion ring desc sanity check

Suspect HW update WBM2SW ring HP, but the ring entry contents are
not updated accordingly which then host will fetch one stale ring entry,
this makes other TX packet are freed unexpectedlly.

Add change to detect this situation earlier, if HW cookie conversion is
done, then invalidate 2nd dword for upper 32bits of VA, so next time when
reap this ring entry contents to know if this desc is updated by
HW or not. if HW cookie conversion is not done, then compare the PA in
buff_addr_info with PA in current TX desc to check.

Change-Id: I351eb4f860216fc618ff28736d4832fcec45dcc5
CRs-Fixed: 3345935
This commit is contained in:
Jinwei Chen
2022-11-30 02:14:31 -08:00
committed by Madan Koyyalamudi
parent 0456b0a11e
commit 1bf08f3566
7 changed files with 141 additions and 37 deletions

View File

@@ -2634,6 +2634,7 @@ struct cdp_per_cpu_packets {
* @tx.desc_in_use: Descriptors in use at soc
* @tx.dropped_fw_removed: HW_release_reason == FW removed
* @tx.invalid_release_source: tx completion release_src != HW or FW
* @tx.invalid_tx_comp_desc: TX Desc from completion ring Desc is not valid
* @tx.wifi_internal_error: tx completion wifi_internal_error
* @tx.non_wifi_internal_err: tx completion non_wifi_internal_error
* @tx.tx_comp_loop_pkt_limit_hit: TX Comp loop packet limit hit
@@ -2717,6 +2718,7 @@ struct cdp_soc_stats {
uint32_t desc_in_use;
uint32_t dropped_fw_removed;
uint32_t invalid_release_source;
uint32_t invalid_tx_comp_desc;
uint32_t wifi_internal_error[CDP_MAX_WIFI_INT_ERROR_REASONS];
uint32_t non_wifi_internal_err;
uint32_t tx_comp_loop_pkt_limit_hit;