* Re: [PATCH v1 1/1] scsi: ufs: Fix system suspend status
[not found] ` <1546870774-19691-3-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
@ 2019-01-10 3:13 ` Stanley Chu
2019-01-10 11:59 ` Avri Altman
2019-01-12 3:17 ` Martin K. Petersen
2 siblings, 0 replies; 6+ messages in thread
From: Stanley Chu @ 2019-01-10 3:13 UTC (permalink / raw)
To: linux-scsi-u79uwXL29TY76Z2rM5mHXA,
vinholikatti-Re5JQEeQqe8AvxtiuMwx3w, avri.altman-Sjgp3cTcYWE
Cc: matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w,
kuohong.wang-NuS5LvNUpcJWk0Htik3J/w,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
peter.wang-NuS5LvNUpcJWk0Htik3J/w,
wsd_upstream-NuS5LvNUpcJWk0Htik3J/w
(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-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org wrote:
> From: Stanley Chu <stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
>
> 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-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> ---
> 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);
^ permalink raw reply [flat|nested] 6+ messages in thread* RE: [PATCH v1 1/1] scsi: ufs: Fix system suspend status
[not found] ` <1546870774-19691-3-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2019-01-10 3:13 ` Stanley Chu
@ 2019-01-10 11:59 ` Avri Altman
2019-01-12 3:17 ` Martin K. Petersen
2 siblings, 0 replies; 6+ messages in thread
From: Avri Altman @ 2019-01-10 11:59 UTC (permalink / raw)
To: stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
kuohong.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
peter.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
wsd_upstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org
Hi,
>
> 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-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Reviewed-by: Avri Altman <avri.altman-Sjgp3cTcYWE@public.gmane.org>
This is already happening today for Qualcomm's vops,
but you are right - it should happen anyway,
regardless the platform's vendor specific resume callback.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v1 1/1] scsi: ufs: Fix system suspend status
[not found] ` <1546870774-19691-3-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2019-01-10 3:13 ` Stanley Chu
2019-01-10 11:59 ` Avri Altman
@ 2019-01-12 3:17 ` Martin K. Petersen
2 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2019-01-12 3:17 UTC (permalink / raw)
To: stanley.chu-NuS5LvNUpcJWk0Htik3J/w
Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA,
wsd_upstream-NuS5LvNUpcJWk0Htik3J/w,
kuohong.wang-NuS5LvNUpcJWk0Htik3J/w,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
peter.wang-NuS5LvNUpcJWk0Htik3J/w,
matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w
Stanley,
> 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.
Applied to 5.0/scsi-fixes. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread