diff options
author | adam radford <aradford@gmail.com> | 2012-10-01 22:26:59 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-10-09 06:12:30 -0400 |
commit | 079eaddf2e5cd903565caf5118ff4907df8bad29 (patch) | |
tree | 436adfe6f08cea086acf5eb6870b935688bad880 | |
parent | 58af7b884fb17bf24fd8effeb6377a2aaaf13d62 (diff) |
[SCSI] megaraid_sas: Add module param for configurable MSI-X vector count
Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 0393ec478cdf..427a658d44ab 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c | |||
@@ -71,6 +71,10 @@ static int msix_disable; | |||
71 | module_param(msix_disable, int, S_IRUGO); | 71 | module_param(msix_disable, int, S_IRUGO); |
72 | MODULE_PARM_DESC(msix_disable, "Disable MSI-X interrupt handling. Default: 0"); | 72 | MODULE_PARM_DESC(msix_disable, "Disable MSI-X interrupt handling. Default: 0"); |
73 | 73 | ||
74 | static unsigned int msix_vectors; | ||
75 | module_param(msix_vectors, int, S_IRUGO); | ||
76 | MODULE_PARM_DESC(msix_vectors, "MSI-X max vector count. Default: Set by FW"); | ||
77 | |||
74 | static int throttlequeuedepth = MEGASAS_THROTTLE_QUEUE_DEPTH; | 78 | static int throttlequeuedepth = MEGASAS_THROTTLE_QUEUE_DEPTH; |
75 | module_param(throttlequeuedepth, int, S_IRUGO); | 79 | module_param(throttlequeuedepth, int, S_IRUGO); |
76 | MODULE_PARM_DESC(throttlequeuedepth, | 80 | MODULE_PARM_DESC(throttlequeuedepth, |
@@ -3520,6 +3524,10 @@ static int megasas_init_fw(struct megasas_instance *instance) | |||
3520 | instance->msix_vectors = (readl(&instance->reg_set-> | 3524 | instance->msix_vectors = (readl(&instance->reg_set-> |
3521 | outbound_scratch_pad_2 | 3525 | outbound_scratch_pad_2 |
3522 | ) & 0x1F) + 1; | 3526 | ) & 0x1F) + 1; |
3527 | if (msix_vectors) | ||
3528 | instance->msix_vectors = | ||
3529 | min(msix_vectors, | ||
3530 | instance->msix_vectors); | ||
3523 | } else | 3531 | } else |
3524 | instance->msix_vectors = 1; | 3532 | instance->msix_vectors = 1; |
3525 | /* Don't bother allocating more MSI-X vectors than cpus */ | 3533 | /* Don't bother allocating more MSI-X vectors than cpus */ |