Commit 7c36711a authored by Jiawen Wu's avatar Jiawen Wu Committed by Paolo Abeni

net: txgbe: initialize num_q_vectors for MSI/INTx interrupts

When using MSI/INTx interrupts, wx->num_q_vectors is uninitialized.
Thus there will be kernel panic in wx_alloc_q_vectors() to allocate
queue vectors.

Fixes: 3f703186 ("net: libwx: Add irq flow functions")
Signed-off-by: default avatarJiawen Wu <jiawenwu@trustnetic.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent b698ab56
...@@ -1686,6 +1686,7 @@ static int wx_set_interrupt_capability(struct wx *wx) ...@@ -1686,6 +1686,7 @@ static int wx_set_interrupt_capability(struct wx *wx)
} }
pdev->irq = pci_irq_vector(pdev, 0); pdev->irq = pci_irq_vector(pdev, 0);
wx->num_q_vectors = 1;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment