From 160231e34b8e9512ba20530f3e68fb0ac499af87 Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Thu, 1 Aug 2024 16:35:09 +0200 Subject: [PATCH 7/8] net: airoha: Start all qdma NAPIs in airoha_probe() This is a preliminary patch to support multi-QDMA controllers. Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/b51cf69c94d8cbc81e0a0b35587f024d01e6d9c0.1722522582.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/mediatek/airoha_eth.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/net/ethernet/mediatek/airoha_eth.c +++ b/drivers/net/ethernet/mediatek/airoha_eth.c @@ -2122,9 +2122,8 @@ static void airoha_hw_cleanup(struct air } } -static void airoha_qdma_start_napi(struct airoha_eth *eth) +static void airoha_qdma_start_napi(struct airoha_qdma *qdma) { - struct airoha_qdma *qdma = ð->qdma[0]; int i; for (i = 0; i < ARRAY_SIZE(qdma->q_tx_irq); i++) @@ -2693,7 +2692,9 @@ static int airoha_probe(struct platform_ if (err) goto error; - airoha_qdma_start_napi(eth); + for (i = 0; i < ARRAY_SIZE(eth->qdma); i++) + airoha_qdma_start_napi(ð->qdma[i]); + for_each_child_of_node(pdev->dev.of_node, np) { if (!of_device_is_compatible(np, "airoha,eth-mac")) continue;