Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: airoha: Set REG_RX_CPU_IDX() once in airoha_qdma_fill_rx_queue()

It is not necessary to update REG_RX_CPU_IDX register for each iteration
of the descriptor loop in airoha_qdma_fill_rx_queue routine.
Move REG_RX_CPU_IDX configuration out of the descriptor loop and rely on
the last queue head value updated in the descriptor loop.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20260331-airoha-cpu-idx-out-off-loop-v1-1-75c66b428f50@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Lorenzo Bianconi and committed by
Paolo Abeni
269389ba f1fa1157

+2 -1
+2 -1
drivers/net/ethernet/airoha/airoha_eth.c
··· 572 572 WRITE_ONCE(desc->msg1, 0); 573 573 WRITE_ONCE(desc->msg2, 0); 574 574 WRITE_ONCE(desc->msg3, 0); 575 + } 575 576 577 + if (nframes) 576 578 airoha_qdma_rmw(qdma, REG_RX_CPU_IDX(qid), 577 579 RX_RING_CPU_IDX_MASK, 578 580 FIELD_PREP(RX_RING_CPU_IDX_MASK, q->head)); 579 - } 580 581 581 582 return nframes; 582 583 }