Skip to content

Commit 4cd9d22

Browse files
LorenzoBianconikuba-moo
authored andcommitted
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 <[email protected]> Reviewed-by: Alexander Lobakin <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 11cd020 commit 4cd9d22

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/net/ethernet/airoha/airoha_eth.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,7 @@ static int airoha_fe_init(struct airoha_eth *eth)
551551

552552
static int airoha_qdma_fill_rx_queue(struct airoha_queue *q)
553553
{
554-
enum dma_data_direction dir = page_pool_get_dma_dir(q->page_pool);
555554
struct airoha_qdma *qdma = q->qdma;
556-
struct airoha_eth *eth = qdma->eth;
557555
int qid = q - &qdma->q_rx[0];
558556
int nframes = 0;
559557

@@ -577,9 +575,6 @@ static int airoha_qdma_fill_rx_queue(struct airoha_queue *q)
577575
e->dma_addr = page_pool_get_dma_addr(page) + offset;
578576
e->dma_len = SKB_WITH_OVERHEAD(q->buf_size);
579577

580-
dma_sync_single_for_device(eth->dev, e->dma_addr, e->dma_len,
581-
dir);
582-
583578
val = FIELD_PREP(QDMA_DESC_LEN_MASK, e->dma_len);
584579
WRITE_ONCE(desc->ctrl, cpu_to_le32(val));
585580
WRITE_ONCE(desc->addr, cpu_to_le32(e->dma_addr));

0 commit comments

Comments
 (0)