All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Seunghui Lee" <sh043.lee@samsung.com>
To: "'Bean Huo'" <huobean@gmail.com>, <alim.akhtar@samsung.com>,
	<avri.altman@wdc.com>, <bvanassche@acm.org>,
	<James.Bottomley@HansenPartnership.com>,
	<martin.petersen@oracle.com>, <linux-scsi@vger.kernel.org>,
	<sdriver.sec@samsung.com>
Subject: RE: [PATCH] ufs: core: Use link recovery when the h8 exit failure during runtime resume
Date: Wed, 16 Jul 2025 16:49:32 +0900	[thread overview]
Message-ID: <00f301dbf626$2b2a1550$817e3ff0$@samsung.com> (raw)
In-Reply-To: <005801dbf61f$7287e7d0$5797b770$@samsung.com>

> -----Original Message-----
> From: Seunghui Lee <sh043.lee@samsung.com>
> Sent: Wednesday, July 16, 2025 4:01 PM
> To: 'Bean Huo' <huobean@gmail.com>; alim.akhtar@samsung.com;
> avri.altman@wdc.com; bvanassche@acm.org;
> James.Bottomley@HansenPartnership.com; martin.petersen@oracle.com; linux-
> scsi@vger.kernel.org; sdriver.sec@samsung.com
> Subject: RE: [PATCH] ufs: core: Use link recovery when the h8 exit failure
> during runtime resume
> 
> > -----Original Message-----
> > From: Bean Huo <huobean@gmail.com>
> > Sent: Wednesday, July 16, 2025 12:22 AM
> > To: 이승희 <sh043.lee@samsung.com>; alim.akhtar@samsung.com;
> > avri.altman@wdc.com; bvanassche@acm.org;
> > James.Bottomley@HansenPartnership.com; martin.petersen@oracle.com;
> > linux- scsi@vger.kernel.org; sdriver.sec@samsung.com
> > Subject: Re: [PATCH] ufs: core: Use link recovery when the h8 exit
> > failure during runtime resume
> >
> >
> > You patched ufshcd_runtime_suspend() to return -EBUSY if
> > eh_in_progress is true — meant to avoid suspend during error handling.
> > I don't understand why here parent is not active?
> 
> After checking the RPM devices, I found that the parent device is
> suspended due to the failure of ufshcd_wl_runtime_resume.
> Even if we guarantee both the completion of ufshcd_runtime_suspend and the
> error handling completion to avoid races, ufshcd_recover_pm_error can't
> fully recover from a runtime pm failure scenario.
> 
> >
> > would like to try return -EAGAIN?
> >
> >
> > Kind regards,
> > Bean
> >
> 
> I've tried that as well, but it doesn't work either.
> [  328.915154] [0:  kworker/u32:7:  941] ufs_device_wlun 0:0:0:49488:
> runtime PM trying to activate child device 0:0:0:49488 but parent
> (target0:0:0) is not active [  328.915156] [0:  kworker/u32:7:  941]
> ufs_device_wlun 0:0:0:49488: ufshcd_recover_pm_error: rpm set_active ret(-
> 16) [  328.915157] [0:  kworker/u32:7:  941] ufshcd-qcom 1d84000.ufshc:
> ufshcd_recover_pm_error: rpm set_active ret(-11) Due to this error,
> pm_request_resume(q->dev) for each scsi device can't execute.
> This causes the I/O stack to become stuck.
> 
> This issue arises from the race condition between the runtime pm worker
> and the error handler worker.
> I believe it would be safer to handle recovery within the runtime pm
> worker itself.
> 
> For reference, ufshcd_link_recovery is useful for the similar issue.
> (resolving the race condition between the runtime pm worker and the SCSI
> error handler worker) https://patchwork.kernel.org/project/linux-
> scsi/patch/20230927033557.13801-1-peter.wang@mediatek.com/
> 
> I'll add Fixes tags and modify v2 as requested.
> 
> Thank you,
> Seunghui Lee.
> 

I would love to find the previous tag, but it's old code.
And plus, it's hard to pick one commit for Fixes.
Please understand this.

If this commit is okay, please review this commit.

Thank you,
Seunghui Lee.



  reply	other threads:[~2025-07-16  7:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250714090630epcas1p28ab8afec11bbab4d256dfe6649d3b00b@epcas1p2.samsung.com>
2025-07-14  9:06 ` [PATCH] ufs: core: Use link recovery when the h8 exit failure during runtime resume Seunghui Lee
2025-07-14 11:21   ` Bean Huo
2025-07-15  2:23     ` 이승희
2025-07-15 12:47       ` Bean Huo
2025-07-15 15:21       ` Bean Huo
2025-07-16  7:01         ` Seunghui Lee
2025-07-16  7:49           ` Seunghui Lee [this message]
2025-07-16 13:35             ` Bean Huo
2025-07-16 15:02               ` Bart Van Assche
2025-07-17  6:12               ` Seunghui Lee
2025-07-16 15:14           ` Bart Van Assche
2025-07-17  6:01             ` Seunghui Lee

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='00f301dbf626$2b2a1550$817e3ff0$@samsung.com' \
    --to=sh043.lee@samsung.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=huobean@gmail.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sdriver.sec@samsung.com \
    /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.