summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2019-02-27 21:38:29 +0300
committerFelix Fietkau <nbd@nbd.name>2019-03-07 14:50:23 +0300
commitfc7801021733b9fbf213ae2bde5dc5e73896a9c7 (patch)
tree9e31906dd6774325a5fb2cd7d77224ae1a0a3b98 /drivers/net/wireless
parentcd44bc40a1f1eb4e259889579d599f30b1287828 (diff)
downloadlinux-fc7801021733b9fbf213ae2bde5dc5e73896a9c7.tar.xz
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.c2
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);