summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid/megaraid_sas_base.c
diff options
context:
space:
mode:
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>2017-08-23 04:46:56 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2017-08-24 22:29:10 -0400
commite636a7a430f41efb0ff2727960ce61ef9f8f6769 (patch)
treecc3cd1c6d95b06130deffbcedad4fa9f384af6a9 /drivers/scsi/megaraid/megaraid_sas_base.c
parented2983f458bed9dc827ec60c8486253b1669bb52 (diff)
downloadop-kernel-dev-e636a7a430f41efb0ff2727960ce61ef9f8f6769.zip
op-kernel-dev-e636a7a430f41efb0ff2727960ce61ef9f8f6769.tar.gz
scsi: megaraid_sas: set minimum value of resetwaittime to be 1 secs
Setting resetwaittime to 0 during a FW fault will result in driver not calling the OCR. Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com> Cc: stable@vger.kernel.org Reviewed-by: Hannes Reinecke <hare@suse.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_base.c')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 5202c2f..2c309ec 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -5479,7 +5479,8 @@ static int megasas_init_fw(struct megasas_instance *instance)
instance->throttlequeuedepth =
MEGASAS_THROTTLE_QUEUE_DEPTH;
- if (resetwaittime > MEGASAS_RESET_WAIT_TIME)
+ if ((resetwaittime < 1) ||
+ (resetwaittime > MEGASAS_RESET_WAIT_TIME))
resetwaittime = MEGASAS_RESET_WAIT_TIME;
if ((scmd_timeout < 10) || (scmd_timeout > MEGASAS_DEFAULT_CMD_TIMEOUT))
OpenPOWER on IntegriCloud