mt76: mt7663s: fix the possible device hang in high traffic
[ Upstream commit45247a8561] 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:1522ff731f("mt76: mt7663s: introduce sdio tx aggregation") Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
188dfc4702
commit
de4e60382b
2 changed files with 5 additions and 0 deletions
|
|
@ -201,6 +201,8 @@ static int mt7663s_tx_run_queue(struct mt76_dev *dev, enum mt76_txq_id qid)
|
|||
struct mt76_queue_entry *e = &q->entry[q->first];
|
||||
struct sk_buff *iter;
|
||||
|
||||
smp_rmb();
|
||||
|
||||
if (!test_bit(MT76_STATE_MCU_RUNNING, &dev->phy.state)) {
|
||||
__skb_put_zero(e->skb, 4);
|
||||
err = __mt7663s_xmit_queue(dev, e->skb->data,
|
||||
|
|
|
|||
|
|
@ -215,6 +215,9 @@ mt76s_tx_queue_skb(struct mt76_dev *dev, enum mt76_txq_id qid,
|
|||
|
||||
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++;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue