Skip to content

Commit a6dcfe0

Browse files
Quinn Tranmartinkpetersen
authored andcommitted
scsi: qla2xxx: Limit interrupt vectors to number of CPUs
Driver created too many QPairs(126) with 28xx adapter. Limit to the number of CPUs to minimize wasted resources. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent c159965 commit a6dcfe0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/scsi/qla2xxx/qla_isr.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3952,10 +3952,12 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
39523952
if (USER_CTRL_IRQ(ha) || !ha->mqiobase) {
39533953
/* user wants to control IRQ setting for target mode */
39543954
ret = pci_alloc_irq_vectors(ha->pdev, min_vecs,
3955-
ha->msix_count, PCI_IRQ_MSIX);
3955+
min((u16)ha->msix_count, (u16)num_online_cpus()),
3956+
PCI_IRQ_MSIX);
39563957
} else
39573958
ret = pci_alloc_irq_vectors_affinity(ha->pdev, min_vecs,
3958-
ha->msix_count, PCI_IRQ_MSIX | PCI_IRQ_AFFINITY,
3959+
min((u16)ha->msix_count, (u16)num_online_cpus()),
3960+
PCI_IRQ_MSIX | PCI_IRQ_AFFINITY,
39593961
&desc);
39603962

39613963
if (ret < 0) {

0 commit comments

Comments
 (0)