Skip to content

Commit f00037a

Browse files
LorenzoBianconigregkh
authored andcommitted
net: airoha: Add missing RX_CPU_IDX() configuration in airoha_qdma_cleanup_rx_queue()
[ Upstream commit 656121b ] When the descriptor index written in REG_RX_CPU_IDX() is equal to the one stored in REG_RX_DMA_IDX(), the hw will stop since the QDMA RX ring is empty. Add missing REG_RX_CPU_IDX() configuration in airoha_qdma_cleanup_rx_queue routine during QDMA RX ring cleanup. Fixes: 514aac3 ("net: airoha: Add missing cleanup bits in airoha_qdma_cleanup_rx_queue()") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20260408-airoha-cpu-idx-airoha_qdma_cleanup_rx_queue-v1-1-8efa64844308@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent ca24fca commit f00037a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/net/ethernet/mediatek/airoha_eth.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,6 +1641,11 @@ static void airoha_qdma_cleanup_rx_queue(struct airoha_queue *q)
16411641
}
16421642

16431643
q->head = q->tail;
1644+
/* Set RX_DMA_IDX to RX_CPU_IDX to notify the hw the QDMA RX ring is
1645+
* empty.
1646+
*/
1647+
airoha_qdma_rmw(qdma, REG_RX_CPU_IDX(qid), RX_RING_CPU_IDX_MASK,
1648+
FIELD_PREP(RX_RING_CPU_IDX_MASK, q->head));
16441649
airoha_qdma_rmw(qdma, REG_RX_DMA_IDX(qid), RX_RING_DMA_IDX_MASK,
16451650
FIELD_PREP(RX_RING_DMA_IDX_MASK, q->tail));
16461651
}

0 commit comments

Comments
 (0)