Patch "net: libwx: fix alloc msix vectors failed" has been added to the 6.6-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

    net: libwx: fix alloc msix vectors failed

to the 6.6-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:
     net-libwx-fix-alloc-msix-vectors-failed.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 8d0b92827ffaa1a7debdb7dd02ee838cb667d4b0
Author: Duanqiang Wen <duanqiangwen@xxxxxxxxxxxxx>
Date:   Thu Apr 18 10:15:56 2024 +0800

    net: libwx: fix alloc msix vectors failed
    
    [ Upstream commit 69197dfc64007b5292cc960581548f41ccd44828 ]
    
    driver needs queue msix vectors and one misc irq vector,
    but only queue vectors need irq affinity.
    when num_online_cpus is less than chip max msix vectors,
    driver will acquire (num_online_cpus + 1) vecotrs, and
    call pci_alloc_irq_vectors_affinity functions with affinity
    params without setting pre_vectors or post_vectors, it will
    cause return error code -ENOSPC.
    Misc irq vector is vector 0, driver need to set affinity params
    .pre_vectors = 1.
    
    Fixes: 3f703186113f ("net: libwx: Add irq flow functions")
    Signed-off-by: Duanqiang Wen <duanqiangwen@xxxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
index e078f4071dc23..be434c833c69c 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
@@ -1585,7 +1585,7 @@ static void wx_set_num_queues(struct wx *wx)
  */
 static int wx_acquire_msix_vectors(struct wx *wx)
 {
-	struct irq_affinity affd = {0, };
+	struct irq_affinity affd = { .pre_vectors = 1 };
 	int nvecs, i;
 
 	nvecs = min_t(int, num_online_cpus(), wx->mac.max_msix_vectors);




[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