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: Get rid of dma_sync_single_for_device() in airoha_qdma_fill_rx_queue()

Since the page_pool for airoha_eth driver is created with
PP_FLAG_DMA_SYNC_DEV flag, we do not need to sync_for_device each page
received from the pool since it is already done by the page_pool codebase.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Link: https://patch.msgid.link/20250625-airoha-sync-for-device-v1-1-923741deaabf@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Lorenzo Bianconi and committed by
Jakub Kicinski
4cd9d227 11cd0206

-5
-5
drivers/net/ethernet/airoha/airoha_eth.c
··· 551 551 552 552 static int airoha_qdma_fill_rx_queue(struct airoha_queue *q) 553 553 { 554 - enum dma_data_direction dir = page_pool_get_dma_dir(q->page_pool); 555 554 struct airoha_qdma *qdma = q->qdma; 556 - struct airoha_eth *eth = qdma->eth; 557 555 int qid = q - &qdma->q_rx[0]; 558 556 int nframes = 0; 559 557 ··· 574 576 e->buf = page_address(page) + offset; 575 577 e->dma_addr = page_pool_get_dma_addr(page) + offset; 576 578 e->dma_len = SKB_WITH_OVERHEAD(q->buf_size); 577 - 578 - dma_sync_single_for_device(eth->dev, e->dma_addr, e->dma_len, 579 - dir); 580 579 581 580 val = FIELD_PREP(QDMA_DESC_LEN_MASK, e->dma_len); 582 581 WRITE_ONCE(desc->ctrl, cpu_to_le32(val));