summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiawen Wu <jiawenwu@trustnetic.com>2024-07-01 15:14:13 +0800
committerPaolo Abeni <pabeni@redhat.com>2024-07-02 16:07:04 +0200
commit7c36711a2cd8059c2d24f5e5c1d76e8ea2d5613c (patch)
treeea86d3e6f650fd44fe641fcc3d8acdde81252c81
parentb698ab56837bc9e666b7e7e12e9c28fe1d6a763c (diff)
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: 3f703186113f ("net: libwx: Add irq flow functions") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-rw-r--r--drivers/net/ethernet/wangxun/libwx/wx_lib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
index 68bde91b67a0..f53776877f71 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
@@ -1686,6 +1686,7 @@ static int wx_set_interrupt_capability(struct wx *wx)
}
pdev->irq = pci_irq_vector(pdev, 0);
+ wx->num_q_vectors = 1;
return 0;
}