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>,
"mani@kernel.org" <mani@kernel.org>,
"James.Bottomley@hansenpartnership.com"
<James.Bottomley@hansenpartnership.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Subject: Re: [PATCH 1/1] scsi: ufs: core: Fix EH failure after wlun resume error
Date: Thu, 13 Nov 2025 10:06:15 +0000 [thread overview]
Message-ID: <c4bd6532b003089fedf518db878a3843c516217c.camel@mediatek.com> (raw)
In-Reply-To: <CA+=0d2YnrDL41DXtC8kDmtXioy4+hohGsmrOPxJY31jqt22uww@mail.gmail.com>
On Wed, 2025-11-12 at 17:18 +0800, Brian Kao wrote:
> This log actually is triggered by fault injection when wlun is
> suspended
> echo 0xf > /sys/kernel/debug/ufshcd/3c2d0000.ufs/saved_uic_err
>
> In a real-world scenario, this situation can occur when an error
> interrupt calls `ufshcd_check_errors()`, which schedules the error
> handler before the system reaches `ufshcd_set_dev_pwr_mode()`.
Hi Brian,
When ufshcd_suspend is called, it disables IRQs by calling
ufshcd_disable_irq. So, in a real-world scenario, it should
not be possible for the UFS to be suspended and the error
handler work to be triggered by an IRQ.
Fault injection using saved_uic_err could create this situation,
but if this cannot happen in reality, we should consider whether
this is a reasonable test case? If it is, then I think this patch
looks good to me. If not, maybe we should get the runtime PM state
in the fault injection and remove this redundant recovery code.
What do you think?
Thanks
Peter
next prev parent reply other threads:[~2025-11-13 10:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-12 6:32 [PATCH 1/1] scsi: ufs: core: Fix EH failure after wlun resume error Po-Wen Kao
2025-11-12 8:17 ` Peter Wang (王信友)
[not found] ` <CA+=0d2YnrDL41DXtC8kDmtXioy4+hohGsmrOPxJY31jqt22uww@mail.gmail.com>
2025-11-12 9:29 ` Brian Kao
2025-11-13 10:06 ` Peter Wang (王信友) [this message]
2025-11-18 7:26 ` Brian Kao
2025-11-19 9:18 ` Peter Wang (王信友)
2025-11-19 23:44 ` Brian Kao
2025-11-20 13:14 ` Peter Wang (王信友)
2025-11-20 16:32 ` Bart Van Assche
2025-11-29 20:02 ` Martin K. Petersen
2025-12-09 3:21 ` 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=c4bd6532b003089fedf518db878a3843c516217c.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=mani@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