diff options
author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2014-05-29 11:53:02 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-06-02 03:54:54 -0400 |
commit | f89439bc2e12a0eab57f15411e668525dc7e61ec (patch) | |
tree | 52287d94870b9521969374a4fc866e39fd92add0 | |
parent | 7b9235ee19aa7405d91f00a3e1668029cbf4a463 (diff) |
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>
-rw-r--r-- | drivers/scsi/hpsa.c | 2 | ||||
-rw-r--r-- | drivers/scsi/hpsa_cmd.h | 2 |
2 files changed, 3 insertions, 1 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) | |||
6164 | if (pci_find_capability(h->pdev, PCI_CAP_ID_MSIX)) { | 6164 | if (pci_find_capability(h->pdev, PCI_CAP_ID_MSIX)) { |
6165 | dev_info(&h->pdev->dev, "MSIX\n"); | 6165 | dev_info(&h->pdev->dev, "MSIX\n"); |
6166 | h->msix_vector = MAX_REPLY_QUEUES; | 6166 | h->msix_vector = MAX_REPLY_QUEUES; |
6167 | if (h->msix_vector > num_online_cpus()) | ||
6168 | h->msix_vector = num_online_cpus(); | ||
6167 | err = pci_enable_msix(h->pdev, hpsa_msix_entries, | 6169 | err = pci_enable_msix(h->pdev, hpsa_msix_entries, |
6168 | h->msix_vector); | 6170 | h->msix_vector); |
6169 | if (err > 0) { | 6171 | if (err > 0) { |
diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h index db89245e0776..104b67b83d28 100644 --- a/drivers/scsi/hpsa_cmd.h +++ b/drivers/scsi/hpsa_cmd.h | |||
@@ -615,7 +615,7 @@ struct TransTable_struct { | |||
615 | u32 RepQCount; | 615 | u32 RepQCount; |
616 | u32 RepQCtrAddrLow32; | 616 | u32 RepQCtrAddrLow32; |
617 | u32 RepQCtrAddrHigh32; | 617 | u32 RepQCtrAddrHigh32; |
618 | #define MAX_REPLY_QUEUES 8 | 618 | #define MAX_REPLY_QUEUES 64 |
619 | struct vals32 RepQAddr[MAX_REPLY_QUEUES]; | 619 | struct vals32 RepQAddr[MAX_REPLY_QUEUES]; |
620 | }; | 620 | }; |
621 | 621 | ||