diff mbox series

[14/19] megaraid_sas: Re-use max_mfi_cmds to calculate queue sizes

Message ID 1539341853-26814-15-git-send-email-shivasharan.srikanteshwara@broadcom.com (mailing list archive)
State Changes Requested
Headers show
Series megaraid_sas: Driver updates | expand

Commit Message

Shivasharan Srikanteshwara Oct. 12, 2018, 10:57 a.m. UTC
In megasas_init_adapter_fusion(), max_mfi_cmds is being calcuated as
(MEGASAS_FUSION_INTERNAL_CMDS + MEGASAS_FUSION_IOCTL_CMDS).
max_mfi_cmds can be used in megasas_configure_queue_sizes.

Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
---
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 881bcfdcfa80..0a8b7167d05d 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -1564,9 +1564,7 @@  void megasas_configure_queue_sizes(struct megasas_instance *instance)
 	else
 		instance->max_mpt_cmds = instance->max_fw_cmds;
 
-	instance->max_scsi_cmds = instance->max_fw_cmds -
-			(MEGASAS_FUSION_INTERNAL_CMDS +
-			MEGASAS_FUSION_IOCTL_CMDS);
+	instance->max_scsi_cmds = instance->max_fw_cmds - instance->max_mfi_cmds;
 	instance->cur_can_queue = instance->max_scsi_cmds;
 	instance->host->can_queue = instance->cur_can_queue;