lkml.org 
[lkml]   [2022]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RESEND PATCH] misc: bcm-vk: Specify the minimum number of IRQ vecs
Date
During bcm_vk_probe(), pci_alloc_irq_vectors() is called passing the
number of IRQ vectors as 1, but, later, check how many IRQ vectors it
got, and fails if it is smaller than VK_MSIX_IRQ_MIN_REQ.

The most appropriated way to do it is setting the 'min_vecs' param as
VK_MSIX_IRQ_MIN_REQ, instead of one. pci_alloc_irq_vectors() should
know the requirements when called.

The test was done by just loading this module on a machine with a
Valkyrie offload engine hardware.

Signed-off-by: Breno Leitao <leitao@debian.org>
Acked-by: Scott Branden <scott.branden@broadcom.com>
---
drivers/misc/bcm-vk/bcm_vk_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/bcm-vk/bcm_vk_dev.c b/drivers/misc/bcm-vk/bcm_vk_dev.c
index a3a82ebbc699..d4a96137728d 100644
--- a/drivers/misc/bcm-vk/bcm_vk_dev.c
+++ b/drivers/misc/bcm-vk/bcm_vk_dev.c
@@ -1339,7 +1339,7 @@ static int bcm_vk_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
pci_set_drvdata(pdev, vk);

irq = pci_alloc_irq_vectors(pdev,
- 1,
+ VK_MSIX_IRQ_MIN_REQ,
VK_MSIX_IRQ_MAX,
PCI_IRQ_MSI | PCI_IRQ_MSIX);

--
2.30.2
\
 
 \ /
  Last update: 2022-08-12 11:42    [W:0.028 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site