diff options
author | Felix Fietkau | 2019-02-27 19:38:29 +0100 |
---|---|---|
committer | Felix Fietkau | 2019-03-07 12:50:23 +0100 |
commit | fc7801021733b9fbf213ae2bde5dc5e73896a9c7 (patch) | |
tree | 9e31906dd6774325a5fb2cd7d77224ae1a0a3b98 /drivers/net/wireless | |
parent | cd44bc40a1f1eb4e259889579d599f30b1287828 (diff) |
mt76: rewrite dma descriptor base and ring size on queue reset
Useful in case the hardware reset clobbers these values
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/dma.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c index 99e341cb1f92..76629b98c78d 100644 --- a/drivers/net/wireless/mediatek/mt76/dma.c +++ b/drivers/net/wireless/mediatek/mt76/dma.c @@ -130,6 +130,8 @@ mt76_dma_tx_cleanup_idx(struct mt76_dev *dev, struct mt76_queue *q, int idx, static void mt76_dma_sync_idx(struct mt76_dev *dev, struct mt76_queue *q) { + iowrite32(q->desc_dma, &q->regs->desc_base); + iowrite32(q->ndesc, &q->regs->ring_size); q->head = ioread32(&q->regs->dma_idx); q->tail = q->head; iowrite32(q->head, &q->regs->cpu_idx); |