]> git.baikalelectronics.ru Git - kernel.git/commit
ath11k: Invalidate cached reo ring entry before accessing it
authorRameshkumar Sundaram <quic_ramess@quicinc.com>
Wed, 16 Feb 2022 08:32:34 +0000 (14:02 +0530)
committerKalle Valo <quic_kvalo@quicinc.com>
Mon, 21 Feb 2022 10:27:19 +0000 (12:27 +0200)
commit6b0ed2511f29a610bfdef45b071c4415160aab9c
treebb152c3c3c29ff2f1a1b232d75283d3d41d778a7
parent2e67e64023140ab56718a0cdd3f2e786c6f6cdd3
ath11k: Invalidate cached reo ring entry before accessing it

REO2SW ring descriptor is currently allocated in cacheable memory.
While reaping reo ring entries on second trial after updating head
pointer, first entry is not invalidated before accessing it.

This results in host reaping and using cached descriptor which is
already overwritten in memory by DMA device (HW).
Since the contents of descriptor(buffer id, peer info and other information
bits) are outdated host throws errors like below while parsing corresponding
MSDU's and drops them.

[347712.048904] ath11k_pci 0004:01:00.0: msdu_done bit in attention is not set
[349173.355503] ath11k_pci 0004:01:00.0: frame rx with invalid buf_id 962

Move the try_again: label above  ath11k_hal_srng_access_begin()
so that first entry will be invalidated and prefetched.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1

Fixes: d853acc25b7b ("ath11k: allocate dst ring descriptors from cacheable memory")
Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/1645000354-32558-1-git-send-email-quic_ramess@quicinc.com
drivers/net/wireless/ath/ath11k/dp_rx.c