]> www.infradead.org Git - users/dwmw2/linux.git/commit
fbnic: Set napi irq value after calling netif_napi_add
authorBrett Creeley <brett.creeley@amd.com>
Thu, 12 Sep 2024 17:49:22 +0000 (10:49 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Sep 2024 03:00:27 +0000 (20:00 -0700)
commit9f3e7f11f21ac83cd99428390165177d4953b005
tree62ca1516c0b61cb7ed77e78e36fce70e00e94d30
parent2c84b0aa28b9e73e8c4b4ce038269469434ae372
fbnic: Set napi irq value after calling netif_napi_add

The driver calls netif_napi_set_irq() and then calls netif_napi_add(),
which calls netif_napi_add_weight(). At the end of
netif_napi_add_weight() is a call to netif_napi_set_irq(napi, -1), which
clears the previously set napi->irq value. Fix this by calling
netif_napi_set_irq() after calling netif_napi_add().

This was found when reviewing another patch and I have no way to test
this, but the fix seemed relatively straight forward.

Fixes: bc6107771bb4 ("eth: fbnic: Allocate a netdevice and napi vectors with queues")
Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Reviewed-by: Joe Damato <jdamato@fastly.com>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20240912174922.10550-1-brett.creeley@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/meta/fbnic/fbnic_txrx.c