linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Can Guo <cang@codeaurora.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: asutoshd@codeaurora.org, nguyenb@codeaurora.org,
	hongwus@codeaurora.org, ziqichen@codeaurora.org,
	linux-scsi@vger.kernel.org, kernel-team@android.com,
	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>, Jaegeuk Kim <jaegeuk@kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 6/6] scsi: ufs: Update the fast abort path in ufshcd_abort() for PM requests
Date: Fri, 14 May 2021 12:17:52 +0800	[thread overview]
Message-ID: <4fba6bc358b293de345258c48fc61f79@codeaurora.org> (raw)
In-Reply-To: <a124700a-e507-e593-d6f5-2da452f3ae7e@acm.org>

On 2021-05-14 12:05, Bart Van Assche wrote:
> On 5/12/21 10:55 PM, Can Guo wrote:
>> If PM requests fail during runtime suspend/resume, RPM framework saves 
>> the
>> error to dev->power.runtime_error. Before the runtime_error gets 
>> cleared,
>> runtime PM on this specific device won't work again, leaving the 
>> device
>> in either suspended or active state permanently.
>> 
>> When task abort happens to a PM request sent during runtime 
>> suspend/resume,
>> even if it can be successfully aborted, RPM framework anyways saves 
>> the
>> (TIMEOUT) error. But we want more and we can do better - let error 
>> handling
>> recover and clear the runtime_error. So, let PM requests take the fast
>> abort path in ufshcd_abort().
> 
> The only RQF_PM requests I know of are START STOP UNIT and SYNCHRONIZE
> CACHE. Are there devices for which these commands can time out or do
> these commands perhaps only time out as the result of error injection?

There are also REQUEST SENSE requests sent with RQF_PM flag set from
pm ops. And they do time out (device does not respond in 60s) in real
cases, at least I have seen quite a lot of related issues reported
from customers these years.

> 
>> -	if (lrbp->lun == UFS_UPIU_UFS_DEVICE_WLUN) {
>> +	if (lrbp->lun == UFS_UPIU_UFS_DEVICE_WLUN ||
>> +	    (cmd->request->rq_flags & RQF_PM)) {
> 
> Which are the RQF_PM commands that are not sent to a WLUN? Are these
> START STOP UNIT and SYNCHRONIZE CACHE only?
> 

There are also REQUEST SENSE cmds sent to the RPMB W-LU, in 
ufshcd_add_wlus(),
ufshcd_err_handler() and ufshcd_rpmb_resume() and/or ufshcd_wl_resume().

And SYNCHRONIZE CACHE cmd is only sent to general LUs, but not W-LUs.

Thanks,
Can Guo.

> Thanks,
> 
> Bart.

      reply	other threads:[~2021-05-14  4:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1620885319-15151-1-git-send-email-cang@codeaurora.org>
2021-05-13  5:55 ` [PATCH v1 1/6] scsi: ufs: Differentiate status between hba pm ops and wl pm ops Can Guo
2021-05-13  5:55 ` [PATCH v1 1/6] scsi: ufs: Differentiate status of hba " Can Guo
2021-05-13  5:58   ` Can Guo
2021-05-13  5:55 ` [PATCH v1 2/6] scsi: ufs: Update the return value of supplier " Can Guo
2021-05-13  5:55 ` [PATCH v1 3/6] scsi: ufs: Simplify error handling preparation Can Guo
2021-05-13  5:55 ` [PATCH v1 4/6] scsi: ufs: Update ufshcd_recover_pm_error() Can Guo
2021-05-13  5:55 ` [PATCH v1 5/6] scsi: ufs: Let host_sem cover the entire system suspend/resume Can Guo
2021-05-14  3:55   ` Bart Van Assche
2021-05-17  3:22     ` Can Guo
2021-05-17 15:05       ` Bart Van Assche
2021-05-13  5:55 ` [PATCH v1 6/6] scsi: ufs: Update the fast abort path in ufshcd_abort() for PM requests Can Guo
2021-05-14  4:05   ` Bart Van Assche
2021-05-14  4:17     ` 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=4fba6bc358b293de345258c48fc61f79@codeaurora.org \
    --to=cang@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=jaegeuk@kernel.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=stanley.chu@mediatek.com \
    --cc=ziqichen@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;
as well as URLs for NNTP newsgroup(s).