Re: [PATCH v1 1/1] scsi: ufs: Fix system suspend status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(Add missing maintainers/reviewers)

Hi Vinayak, Avri,

What would you think about the simple patch as below ?

Regards.

Thanks.


On Mon, 2019-01-07 at 22:19 +0800, stanley.chu@xxxxxxxxxxxx wrote:
> From: Stanley Chu <stanley.chu@xxxxxxxxxxxx>
> 
> hba->is_sys_suspended is set after successful system suspend but
> not clear after successful system resume.
> 
> According to current behavior, hba->is_sys_suspended will not
> be set if host is runtime-suspended but not system-suspended. Thus
> we shall aligh the same policy: clear this flag even if host remains
> runtime-suspended after ufshcd_system_resume is successfully returned.
> 
> Simply fix this flag to correct host status logs.
> 
> Signed-off-by: Stanley Chu <stanley.chu@xxxxxxxxxxxx>
> ---
>  drivers/scsi/ufs/ufshcd.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 23d7cca..17536bd 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -7916,6 +7916,8 @@ int ufshcd_system_resume(struct ufs_hba *hba)
>  	trace_ufshcd_system_resume(dev_name(hba->dev), ret,
>  		ktime_to_us(ktime_sub(ktime_get(), start)),
>  		hba->curr_dev_pwr_mode, hba->uic_link_state);
> +	if (!ret)
> +		hba->is_sys_suspended = false;
>  	return ret;
>  }
>  EXPORT_SYMBOL(ufshcd_system_resume);





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux