megasas_wait_for_outstanding_fusion checks for pending commands every 1
second. But megasas_complete_cmd_dpc_fusion is only called every 5
seconds.  If the commands are already completed by firmware, there is an
additional delay of 5 seconds before driver will process completion for
these commands.
Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
                        }
                }
 
+               megasas_complete_cmd_dpc_fusion((unsigned long)instance);
                outstanding = atomic_read(&instance->fw_outstanding);
                if (!outstanding)
                        goto out;
                        dev_notice(&instance->pdev->dev, "[%2d]waiting for %d "
                               "commands to complete for scsi%d\n", i,
                               outstanding, instance->host->host_no);
-                       megasas_complete_cmd_dpc_fusion(
-                               (unsigned long)instance);
                }
                msleep(1000);
        }