summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid/megaraid_sas_fusion.c
diff options
context:
space:
mode:
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>2017-08-23 04:46:58 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2017-08-24 22:29:11 -0400
commit14298cf3207803b48d7b132fa7ddfd2433ba4f62 (patch)
treee6a310d1d09265c5b5c1c5599a566f7853a9fdd0 /drivers/scsi/megaraid/megaraid_sas_fusion.c
parentbdb5c55fffb9cb11ca7053ffc2d076aa70bf4aac (diff)
downloadlinux-14298cf3207803b48d7b132fa7ddfd2433ba4f62.tar.bz2
scsi: megaraid_sas: Call megasas_complete_cmd_dpc_fusion every 1 second while there are pending commands
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>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas_fusion.c')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fusion.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 28c326451c1e..d33e833ad32c 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -3558,6 +3558,7 @@ int megasas_wait_for_outstanding_fusion(struct megasas_instance *instance,
}
}
+ megasas_complete_cmd_dpc_fusion((unsigned long)instance);
outstanding = atomic_read(&instance->fw_outstanding);
if (!outstanding)
goto out;
@@ -3566,8 +3567,6 @@ int megasas_wait_for_outstanding_fusion(struct megasas_instance *instance,
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);
}