mt76: mt7663s: fix the possible device hang in high traffic

Use the additional memory barrier to ensure the skb list up-to-date
between the skb producer and consumer to avoid the invalid skb content
written into sdio controller and then cause device hang due to mcu assert
caught by WR_TIMEOUT_INT.

Fixes: 1522ff731f84 ("mt76: mt7663s: introduce sdio tx aggregation")
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Sean Wang
2021-03-14 23:39:10 +01:00
committed by Felix Fietkau
parent aafe972e95
commit 0d5b1a7027
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -256,6 +256,9 @@ mt76s_tx_queue_skb(struct mt76_dev *dev, struct mt76_queue *q,
q->entry[q->head].skb = tx_info.skb;
q->entry[q->head].buf_sz = len;
smp_wmb();
q->head = (q->head + 1) % q->ndesc;
q->queued++;