* Re: [PATCH] misc: bcm-vk: Specify the minimum number of IRQ vecs [not found] <20220719122313.500924-1-leitao@leitao.org> @ 2022-07-20 16:12 ` Scott Branden 2022-08-12 9:40 ` [RESEND PATCH] " Breno Leitao 0 siblings, 1 reply; 2+ messages in thread From: Scott Branden @ 2022-07-20 16:12 UTC (permalink / raw) To: Breno Leitao, bcm-kernel-feedback-list; +Cc: leit, linux-kernel, Breno Leitao [-- Attachment #1: Type: text/plain, Size: 1368 bytes --] Hi Breno, On 2022-07-19 05:23, Breno Leitao wrote: > From: Breno Leitao <leitao@debian.org> > > 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. Yes, the end result is no operational change before or after this commit. > > The test was done by just loading this module on a machine with a > Valkyrie offload engine > > 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 a16b99bdaa13..bedab17884b8 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); > [-- Attachment #2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 4212 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
* [RESEND PATCH] misc: bcm-vk: Specify the minimum number of IRQ vecs 2022-07-20 16:12 ` [PATCH] misc: bcm-vk: Specify the minimum number of IRQ vecs Scott Branden @ 2022-08-12 9:40 ` Breno Leitao 0 siblings, 0 replies; 2+ messages in thread From: Breno Leitao @ 2022-08-12 9:40 UTC (permalink / raw) To: arnd, gregkh Cc: scott.branden, bcm-kernel-feedback-list, linux-kernel, Kernel-team 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-12 9:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20220719122313.500924-1-leitao@leitao.org>
2022-07-20 16:12 ` [PATCH] misc: bcm-vk: Specify the minimum number of IRQ vecs Scott Branden
2022-08-12 9:40 ` [RESEND PATCH] " Breno Leitao
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®