On 06/30/2017 10:29 AM, Shivasharan S wrote:
> Setting resetwaittime to 0 will result in driver not calling the OCR
> during a FW fault state.
> 
> Signed-off-by: Kashyap Desai <[email protected]>
> Signed-off-by: Shivasharan S <[email protected]>
> Cc: [email protected]
> ---
>  drivers/scsi/megaraid/megaraid_sas_base.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c 
> b/drivers/scsi/megaraid/megaraid_sas_base.c
> index 316c3df..395c3aa 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -5478,7 +5478,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))
> 
Reviewed-by: Hannes Reinecke <[email protected]>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Teamlead Storage & Networking
[email protected]                                   +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

Reply via email to