From: Stanley Chu <stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
To: linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
vinholikatti-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
avri.altman-Sjgp3cTcYWE@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
Subject: Re: [PATCH v1 1/1] scsi: ufs: Fix system suspend status
Date: Thu, 10 Jan 2019 11:13:12 +0800 [thread overview]
Message-ID: <1547089992.2596.3.camel@mtkswgap22> (raw)
In-Reply-To: <1546870774-19691-3-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
(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);
next prev parent reply other threads:[~2019-01-10 3:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2019-01-10 11:59 ` Avri Altman
2019-01-12 3:17 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1547089992.2596.3.camel@mtkswgap22 \
--to=stanley.chu-nus5lvnupcjwk0htik3j/w@public.gmane.org \
--cc=avri.altman-Sjgp3cTcYWE@public.gmane.org \
--cc=kuohong.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=peter.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=vinholikatti-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=wsd_upstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.