Skip to content

Commit 69197df

Browse files
Duanqiang Wendavem330
authored andcommitted
net: libwx: fix alloc msix vectors failed
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: 3f70318 ("net: libwx: Add irq flow functions") Signed-off-by: Duanqiang Wen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7586c85 commit 69197df

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/wangxun/libwx

1 file changed

+1
-1
lines changed

drivers/net/ethernet/wangxun/libwx/wx_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@ static void wx_set_num_queues(struct wx *wx)
15981598
*/
15991599
static int wx_acquire_msix_vectors(struct wx *wx)
16001600
{
1601-
struct irq_affinity affd = {0, };
1601+
struct irq_affinity affd = { .pre_vectors = 1 };
16021602
int nvecs, i;
16031603

16041604
/* We start by asking for one vector per queue pair */

0 commit comments

Comments
 (0)