summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa.c
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2014-05-29 10:53:02 -0500
committerChristoph Hellwig <hch@lst.de>2014-06-02 09:54:54 +0200
commitf89439bc2e12a0eab57f15411e668525dc7e61ec (patch)
tree52287d94870b9521969374a4fc866e39fd92add0 /drivers/scsi/hpsa.c
parent7b9235ee19aa7405d91f00a3e1668029cbf4a463 (diff)
downloadlinux-f89439bc2e12a0eab57f15411e668525dc7e61ec.tar.bz2
hpsa: choose number of reply queues more intelligently.
No sense having 8 or 16 reply queues if you only have 4 cpus, and likewise no sense limiting to 8 reply queues if you have many more cpus. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Reviewed-by: Mike Miller <michael.miller@canonical.com> Reviewed-by: Scott Teel <scott.teel@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r--drivers/scsi/hpsa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index a02d26a395e3..87066954a859 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -6164,6 +6164,8 @@ static void hpsa_interrupt_mode(struct ctlr_info *h)
if (pci_find_capability(h->pdev, PCI_CAP_ID_MSIX)) {
dev_info(&h->pdev->dev, "MSIX\n");
h->msix_vector = MAX_REPLY_QUEUES;
+ if (h->msix_vector > num_online_cpus())
+ h->msix_vector = num_online_cpus();
err = pci_enable_msix(h->pdev, hpsa_msix_entries,
h->msix_vector);
if (err > 0) {