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

@@ -5825,8 +5825,10 @@ more_data:
soc->arch_ops.tx_comp_get_params_from_hal_desc(soc,
tx_comp_hal_desc,
&tx_desc);
if (!tx_desc) {
if (qdf_unlikely(!tx_desc)) {
dp_err("unable to retrieve tx_desc!");
hal_dump_comp_desc(tx_comp_hal_desc);
DP_STATS_INC(soc, tx.invalid_tx_comp_desc, 1);
QDF_BUG(0);
continue;
}