Message ID | 20241009175509.31753-2-jdamato@fastly.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 25118cce6627ecceabd29d6795d7af16729a35dd |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | tg3: Link IRQs, NAPIs, and queues | expand |
On Wed, Oct 9, 2024 at 10:55 AM Joe Damato <jdamato@fastly.com> wrote: > > Link IRQs to NAPI instances with netif_napi_set_irq. This information > can be queried with the netdev-genl API. > > Signed-off-by: Joe Damato <jdamato@fastly.com> > Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Thanks. Reviewed-by: Michael Chan <michael.chan@broadcom.com>
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 378815917741..6564072b47ba 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -7413,9 +7413,11 @@ static void tg3_napi_init(struct tg3 *tp) { int i; - netif_napi_add(tp->dev, &tp->napi[0].napi, tg3_poll); - for (i = 1; i < tp->irq_cnt; i++) - netif_napi_add(tp->dev, &tp->napi[i].napi, tg3_poll_msix); + for (i = 0; i < tp->irq_cnt; i++) { + netif_napi_add(tp->dev, &tp->napi[i].napi, + i ? tg3_poll_msix : tg3_poll); + netif_napi_set_irq(&tp->napi[i].napi, tp->napi[i].irq_vec); + } } static void tg3_napi_fini(struct tg3 *tp)