From: "Peter Wang (王信友)" <peter.wang@mediatek.com>
To: "powenkao@google.com" <powenkao@google.com>
Cc: "beanhuo@micron.com" <beanhuo@micron.com>,
"avri.altman@wdc.com" <avri.altman@wdc.com>,
"quic_nguyenb@quicinc.com" <quic_nguyenb@quicinc.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"bvanassche@acm.org" <bvanassche@acm.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
"James.Bottomley@HansenPartnership.com"
<James.Bottomley@HansenPartnership.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Subject: Re: [PATCH 1/1] scsi: ufs: core: Schedule EH on WLUN resume failure
Date: Mon, 26 Jan 2026 03:42:26 +0000 [thread overview]
Message-ID: <99f7a432182123d3bf38e5183cbb18457288b602.camel@mediatek.com> (raw)
In-Reply-To: <20260123045504.3507948-1-powenkao@google.com>
On Fri, 2026-01-23 at 04:54 +0000, Po-Wen Kao wrote:
> From: Brian Kao <powenkao@google.com>
>
> On WLUN resume failed, core driver leaves wlun dev in error runtime
> PM state without taking further action. To ensure the driver can
> recover
> from such errors, this patch schedules the error handler to perform
> a full reset when error occurs during WLUN resume.
>
Hi Powen,
May I know at which step in __ufshcd_wl_resume the error occurred?
> Signed-off-by: Brian Kao <powenkao@google.com>
> ---
> drivers/ufs/core/ufshcd.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 057678f4c50a..ac4db8484ee5 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -10236,6 +10236,15 @@ static int __ufshcd_wl_resume(struct ufs_hba
> *hba, enum ufs_pm_op pm_op)
> hba->clk_gating.is_suspended = false;
> ufshcd_release(hba);
> hba->pm_op_in_progress = false;
> +
> + if (ret) {
> + /* ufshcd_reset_and_restore() might set host to
> UFSHCD_STATE_ERROR */
> + scoped_guard(spinlock_irqsave, hba->host->host_lock)
> + hba->ufshcd_state = UFSHCD_STATE_RESET;
> +
> + ufshcd_force_error_recovery(hba);
> + }
> +
> return ret;
>
After recovery, is the return value still an error?
Thanks.
Peter
> }
>
>
> base-commit: a9e03ec01ef2633288fd1b506980f54ae41c5a85
next prev parent reply other threads:[~2026-01-26 3:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 4:54 Po-Wen Kao
2026-01-26 3:42 ` Peter Wang (王信友) [this message]
[not found] ` <CA+=0d2ZKT7ynBLvBcqM3YqLk7tX3knhpNwyL9LKxjB3=KvpVMg@mail.gmail.com>
2026-01-27 6:59 ` Brian Kao
2026-01-30 9:04 ` Peter Wang (王信友)
2026-01-30 22:55 ` Bart Van Assche
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=99f7a432182123d3bf38e5183cbb18457288b602.camel@mediatek.com \
--to=peter.wang@mediatek.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=powenkao@google.com \
--cc=quic_nguyenb@quicinc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®