diff options
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index cf51b48dd7d9..b1726280595a 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | |||
@@ -80,6 +80,10 @@ static int msix_disable = -1; | |||
80 | module_param(msix_disable, int, 0); | 80 | module_param(msix_disable, int, 0); |
81 | MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)"); | 81 | MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)"); |
82 | 82 | ||
83 | static int max_msix_vectors = -1; | ||
84 | module_param(max_msix_vectors, int, 0); | ||
85 | MODULE_PARM_DESC(max_msix_vectors, " max msix vectors "); | ||
86 | |||
83 | static int mpt2sas_fwfault_debug; | 87 | static int mpt2sas_fwfault_debug; |
84 | MODULE_PARM_DESC(mpt2sas_fwfault_debug, " enable detection of firmware fault " | 88 | MODULE_PARM_DESC(mpt2sas_fwfault_debug, " enable detection of firmware fault " |
85 | "and halt firmware - (default=0)"); | 89 | "and halt firmware - (default=0)"); |
@@ -1402,6 +1406,16 @@ _base_enable_msix(struct MPT2SAS_ADAPTER *ioc) | |||
1402 | ioc->reply_queue_count = min_t(int, ioc->cpu_count, | 1406 | ioc->reply_queue_count = min_t(int, ioc->cpu_count, |
1403 | ioc->msix_vector_count); | 1407 | ioc->msix_vector_count); |
1404 | 1408 | ||
1409 | if (max_msix_vectors > 0) { | ||
1410 | ioc->reply_queue_count = min_t(int, max_msix_vectors, | ||
1411 | ioc->reply_queue_count); | ||
1412 | ioc->msix_vector_count = ioc->reply_queue_count; | ||
1413 | } | ||
1414 | |||
1415 | printk(MPT2SAS_INFO_FMT | ||
1416 | "MSI-X vectors supported: %d, no of cores: %d, max_msix_vectors: %d\n", | ||
1417 | ioc->name, ioc->msix_vector_count, ioc->cpu_count, max_msix_vectors); | ||
1418 | |||
1405 | entries = kcalloc(ioc->reply_queue_count, sizeof(struct msix_entry), | 1419 | entries = kcalloc(ioc->reply_queue_count, sizeof(struct msix_entry), |
1406 | GFP_KERNEL); | 1420 | GFP_KERNEL); |
1407 | if (!entries) { | 1421 | if (!entries) { |