diff options
author | Sean Wang <sean.wang@mediatek.com> | 2021-03-04 16:25:23 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-04-12 01:01:24 +0300 |
commit | 45247a85614b49b07b9dc59a4e6783b17e766ff2 (patch) | |
tree | eeddc6c7ee4e718e2ca3149debf36f55430eb44a /drivers/net/wireless/mediatek/mt76/sdio.c | |
parent | 455ae5aabcc72fed7e5c803d59d122415500dc08 (diff) | |
download | linux-45247a85614b49b07b9dc59a4e6783b17e766ff2.tar.xz |
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 <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/sdio.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/sdio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/sdio.c b/drivers/net/wireless/mediatek/mt76/sdio.c index 0b6facb17ff7..a18d2896ee1f 100644 --- a/drivers/net/wireless/mediatek/mt76/sdio.c +++ b/drivers/net/wireless/mediatek/mt76/sdio.c @@ -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++; |