Patch "fbnic: Set napi irq value after calling netif_napi_add" has been added to the 6.11-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    fbnic: Set napi irq value after calling netif_napi_add

to the 6.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     fbnic-set-napi-irq-value-after-calling-netif_napi_ad.patch
and it can be found in the queue-6.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a25c71b31d64eb70ecb6a9ee7c8cdffaad832b65
Author: Brett Creeley <brett.creeley@xxxxxxx>
Date:   Thu Sep 12 10:49:22 2024 -0700

    fbnic: Set napi irq value after calling netif_napi_add
    
    [ Upstream commit 9f3e7f11f21ac83cd99428390165177d4953b005 ]
    
    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@xxxxxxx>
    Reviewed-by: Joe Damato <jdamato@xxxxxxxxxx>
    Reviewed-by: Vadim Fedorenko <vadim.fedorenko@xxxxxxxxx>
    Link: https://patch.msgid.link/20240912174922.10550-1-brett.creeley@xxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
index 0ed4c9fff5d80..72f88ae7815f4 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
@@ -1012,14 +1012,14 @@ static int fbnic_alloc_napi_vector(struct fbnic_dev *fbd, struct fbnic_net *fbn,
 	nv->fbd = fbd;
 	nv->v_idx = v_idx;
 
-	/* Record IRQ to NAPI struct */
-	netif_napi_set_irq(&nv->napi,
-			   pci_irq_vector(to_pci_dev(fbd->dev), nv->v_idx));
-
 	/* Tie napi to netdev */
 	list_add(&nv->napis, &fbn->napis);
 	netif_napi_add(fbn->netdev, &nv->napi, fbnic_poll);
 
+	/* Record IRQ to NAPI struct */
+	netif_napi_set_irq(&nv->napi,
+			   pci_irq_vector(to_pci_dev(fbd->dev), nv->v_idx));
+
 	/* Tie nv back to PCIe dev */
 	nv->dev = fbd->dev;
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux