From: Shivasharan S Date: Wed, 23 Aug 2017 11:46:56 +0000 (-0700) Subject: scsi: megaraid_sas: set minimum value of resetwaittime to be 1 secs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e636a7a430f41efb0ff2727960ce61ef9f8f6769;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Shivasharan S Cc: stable@vger.kernel.org Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 5202c2fd72ac..2c309ec33696 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))