]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
scsi: megaraid_sas: update can_queue only if the new value is less
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Fri, 10 Feb 2017 08:59:26 +0000 (00:59 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 13 Feb 2017 12:26:22 +0000 (07:26 -0500)
Minor Optimization: No need to update HBA can_queue value if the current
max FW commands is equal to earlier value.

Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_sas_fusion.c

index 2d6d979c6ca878c28a2d8374b30d81cc67eaa76f..94b7a68d12cda141b54f44e261edecf74548c343 100644 (file)
@@ -259,7 +259,7 @@ megasas_fusion_update_can_queue(struct megasas_instance *instance, int fw_boot_c
 
        if (fw_boot_context == OCR_CONTEXT) {
                cur_max_fw_cmds = cur_max_fw_cmds - 1;
-               if (cur_max_fw_cmds <= instance->max_fw_cmds) {
+               if (cur_max_fw_cmds < instance->max_fw_cmds) {
                        instance->cur_can_queue =
                                cur_max_fw_cmds - (MEGASAS_FUSION_INTERNAL_CMDS +
                                                MEGASAS_FUSION_IOCTL_CMDS);