From: Shivasharan S Date: Fri, 10 Feb 2017 08:59:27 +0000 (-0800) Subject: scsi: megaraid_sas: max_fw_cmds are decremented twice, remove duplicate X-Git-Tag: v4.1.12-102.0.20170601_1400~16 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8a99112c075dd7b113ca8d4cb3ebed46bff37efc;p=users%2Fjedix%2Flinux-maple.git scsi: megaraid_sas: max_fw_cmds are decremented twice, remove duplicate Orabug: 26096381 Fix to account for the reply_q_sz not exceeding the maximum commands that the firmware can support, instance->max_fw_cmds is already decremented in megasas_fusion_update_can_queue(). Remove the extra decrement logic in code. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen (cherry picked from commit cf4e55e7be0a4c009908803ff4c3140c9822c033) Signed-off-by: Somasundaram Krishnasamy Signed-off-by: Kirtikar Kashyap Reviewed-by: Dhaval Giani --- diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 5eb3afe485c9..12b026645384 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -1282,13 +1282,6 @@ megasas_init_adapter_fusion(struct megasas_instance *instance) megasas_fusion_update_can_queue(instance, PROBE_CONTEXT); - /* - * Reduce the max supported cmds by 1. This is to ensure that the - * reply_q_sz (1 more than the max cmd that driver may send) - * does not exceed max cmds that the FW can support - */ - instance->max_fw_cmds = instance->max_fw_cmds-1; - /* * Only Driver's internal DCMDs and IOCTL DCMDs needs to have MFI frames */