From: Can Guo <cang@codeaurora.org>
To: Alim Akhtar <alim.akhtar@samsung.com>
Cc: asutoshd@codeaurora.org, nguyenb@codeaurora.org,
hongwus@codeaurora.org, rnayak@codeaurora.org,
linux-scsi@vger.kernel.org, kernel-team@android.com,
saravanak@google.com, salyzyn@google.com,
'Avri Altman' <avri.altman@wdc.com>,
"'James E.J. Bottomley'" <jejb@linux.ibm.com>,
"'Martin K. Petersen'" <martin.petersen@oracle.com>,
'Stanley Chu' <stanley.chu@mediatek.com>,
'Bean Huo' <beanhuo@micron.com>,
'Bart Van Assche' <bvanassche@acm.org>,
'Venkat Gopalakrishnan' <venkatg@codeaurora.org>,
'Tomas@codeaurora.org, Winkler' <tomas.winkler@intel.com>,
'open list' <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 1/1] scsi: ufs: full reinit upon resume if link was off
Date: Tue, 14 Apr 2020 13:56:03 +0800 [thread overview]
Message-ID: <98c11950db39f63fa7f6959b223e7372@codeaurora.org> (raw)
In-Reply-To: <019601d61204$b303ace0$190b06a0$@samsung.com>
Hi Alim,
On 2020-04-14 10:30, Alim Akhtar wrote:
> Hi Can,
>
>> -----Original Message-----
>> From: Can Guo <cang@codeaurora.org>
>> Sent: 28 March 2020 07:58
>> To: asutoshd@codeaurora.org; nguyenb@codeaurora.org;
>> hongwus@codeaurora.org; rnayak@codeaurora.org; linux-
>> scsi@vger.kernel.org; kernel-team@android.com; saravanak@google.com;
>> salyzyn@google.com; cang@codeaurora.org
>> Cc: Alim Akhtar <alim.akhtar@samsung.com>; Avri Altman
>> <avri.altman@wdc.com>; James E.J. Bottomley <jejb@linux.ibm.com>;
>> Martin
>> K. Petersen <martin.petersen@oracle.com>; Stanley Chu
>> <stanley.chu@mediatek.com>; Bean Huo <beanhuo@micron.com>; Bart Van
>> Assche <bvanassche@acm.org>; Venkat Gopalakrishnan
>> <venkatg@codeaurora.org>; Tomas Winkler <tomas.winkler@intel.com>;
>> open
>> list <linux-kernel@vger.kernel.org>
>> Subject: [PATCH v1 1/1] scsi: ufs: full reinit upon resume if link was
>> off
>>
>> From: Asutosh Das <asutoshd@codeaurora.org>
>>
>> During suspend, if the link is put to off, it would require a full
> initialization during
Good catch.
>> resume. This patch resets and restores both the hba and the card
>> during
>> initialization.
>>
> In case you have faced issues by not doing what this patch does, it is
> worth
> mentioning that in the commit mesg.
>
OK.
>> Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
>> Signed-off-by: Can Guo <cang@codeaurora.org>
>> ---
> I don't have a way to test this path as of now, changes looks ok
> though.
> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
>
>> drivers/scsi/ufs/ufshcd.c | 8 ++++++--
>> 1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
>> index
>> f19a11e..21e41e5 100644
>> --- a/drivers/scsi/ufs/ufshcd.c
>> +++ b/drivers/scsi/ufs/ufshcd.c
>> @@ -8007,9 +8007,13 @@ static int ufshcd_resume(struct ufs_hba *hba,
>> enum
>> ufs_pm_op pm_op)
>> else
>> goto vendor_suspend;
>> } else if (ufshcd_is_link_off(hba)) {
>> - ret = ufshcd_host_reset_and_restore(hba);
>> /*
>> - * ufshcd_host_reset_and_restore() should have already
>> + * A full initialization of the host and the device is
> required
Shall fix.
>> + * since the link was put to off during suspend.
>> + */
>> + ret = ufshcd_reset_and_restore(hba);
>> + /*
>> + * ufshcd_reset_and_restore() should have already
>> * set the link state as active
>> */
>> if (ret || !ufshcd_is_link_active(hba))
>> --
>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
>> Linux
>> Foundation Collaborative Project.
Thanks.
Can Guo.
prev parent reply other threads:[~2020-04-14 5:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200328022740epcas5p1e97777d3e2dacfbee89fed75d6b36e99@epcas5p1.samsung.com>
2020-03-28 2:27 ` [PATCH v1 1/1] scsi: ufs: full reinit upon resume if link was off Can Guo
2020-03-30 0:35 ` Stanley Chu
2020-03-30 8:43 ` [EXT] " Bean Huo (beanhuo)
2020-04-14 0:34 ` Martin K. Petersen
2020-04-17 11:14 ` Avri Altman
2020-04-14 2:30 ` Alim Akhtar
2020-04-14 5:56 ` Can Guo [this message]
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=98c11950db39f63fa7f6959b223e7372@codeaurora.org \
--to=cang@codeaurora.org \
--cc='Tomas@codeaurora.org \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=hongwus@codeaurora.org \
--cc=jejb@linux.ibm.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nguyenb@codeaurora.org \
--cc=rnayak@codeaurora.org \
--cc=salyzyn@google.com \
--cc=saravanak@google.com \
--cc=stanley.chu@mediatek.com \
--cc=tomas.winkler@intel.com \
--cc=venkatg@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox