mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
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: 3f70318611 ("net: libwx: Add irq flow functions")
Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7586c8501d
commit
69197dfc64
|
|
@ -1598,7 +1598,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;
|
||||
|
||||
/* We start by asking for one vector per queue pair */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user