Commit fc780102 authored by Felix Fietkau's avatar Felix Fietkau

mt76: rewrite dma descriptor base and ring size on queue reset

Useful in case the hardware reset clobbers these values
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent cd44bc40
...@@ -130,6 +130,8 @@ mt76_dma_tx_cleanup_idx(struct mt76_dev *dev, struct mt76_queue *q, int idx, ...@@ -130,6 +130,8 @@ mt76_dma_tx_cleanup_idx(struct mt76_dev *dev, struct mt76_queue *q, int idx,
static void static void
mt76_dma_sync_idx(struct mt76_dev *dev, struct mt76_queue *q) 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->head = ioread32(&q->regs->dma_idx);
q->tail = q->head; q->tail = q->head;
iowrite32(q->head, &q->regs->cpu_idx); iowrite32(q->head, &q->regs->cpu_idx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment