* [PATCH v1] scsi: ufs: Fix system suspend status
@ 2019-01-07 14:19 stanley.chu-NuS5LvNUpcJWk0Htik3J/w
[not found] ` <1546870774-19691-1-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: stanley.chu-NuS5LvNUpcJWk0Htik3J/w @ 2019-01-07 14:19 UTC (permalink / raw)
To: linux-scsi-u79uwXL29TY76Z2rM5mHXA
Cc: matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w,
kuohong.wang-NuS5LvNUpcJWk0Htik3J/w,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
peter.wang-NuS5LvNUpcJWk0Htik3J/w,
wsd_upstream-NuS5LvNUpcJWk0Htik3J/w
hba->is_sys_suspended is set after successful system suspend but
not clear after successful system resume.
Simply fix this flag to correct host status logs.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v1 0/1] scsi: ufs: Fix system suspend status
[not found] ` <1546870774-19691-1-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
@ 2019-01-07 14:19 ` stanley.chu-NuS5LvNUpcJWk0Htik3J/w
2019-01-07 14:19 ` [PATCH v1 1/1] " stanley.chu-NuS5LvNUpcJWk0Htik3J/w
1 sibling, 0 replies; 6+ messages in thread
From: stanley.chu-NuS5LvNUpcJWk0Htik3J/w @ 2019-01-07 14:19 UTC (permalink / raw)
To: linux-scsi-u79uwXL29TY76Z2rM5mHXA
Cc: wsd_upstream-NuS5LvNUpcJWk0Htik3J/w,
kuohong.wang-NuS5LvNUpcJWk0Htik3J/w,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
peter.wang-NuS5LvNUpcJWk0Htik3J/w,
matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w, Stanley Chu
From: Stanley Chu <stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Stanley Chu (1):
scsi: ufs: Fix system suspend status
drivers/scsi/ufs/ufshcd.c | 2 ++
1 file changed, 2 insertions(+)
--
1.9.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v1 1/1] scsi: ufs: Fix system suspend status
[not found] ` <1546870774-19691-1-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2019-01-07 14:19 ` [PATCH v1 0/1] " stanley.chu-NuS5LvNUpcJWk0Htik3J/w
@ 2019-01-07 14:19 ` stanley.chu-NuS5LvNUpcJWk0Htik3J/w
[not found] ` <1546870774-19691-3-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
1 sibling, 1 reply; 6+ messages in thread
From: stanley.chu-NuS5LvNUpcJWk0Htik3J/w @ 2019-01-07 14:19 UTC (permalink / raw)
To: linux-scsi-u79uwXL29TY76Z2rM5mHXA
Cc: wsd_upstream-NuS5LvNUpcJWk0Htik3J/w,
kuohong.wang-NuS5LvNUpcJWk0Htik3J/w,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
peter.wang-NuS5LvNUpcJWk0Htik3J/w,
matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w, Stanley Chu
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);
--
1.9.1
^ permalink raw reply related [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: 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, linux-scsi-u79uwXL29TY76Z2rM5mHXA
Cc: matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w,
kuohong.wang-NuS5LvNUpcJWk0Htik3J/w,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
peter.wang-NuS5LvNUpcJWk0Htik3J/w,
wsd_upstream-NuS5LvNUpcJWk0Htik3J/w
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
end of thread, other threads:[~2019-01-12 3:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-07 14:19 [PATCH v1] scsi: ufs: Fix system suspend status stanley.chu-NuS5LvNUpcJWk0Htik3J/w
[not found] ` <1546870774-19691-1-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2019-01-07 14:19 ` [PATCH v1 0/1] " stanley.chu-NuS5LvNUpcJWk0Htik3J/w
2019-01-07 14:19 ` [PATCH v1 1/1] " stanley.chu-NuS5LvNUpcJWk0Htik3J/w
[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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.