Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: "Fang Hongjie(方洪杰)" <hongjiefang@asrmicro.com>
To: "Peter Wang (王信友)" <peter.wang@mediatek.com>,
	"beanhuo@micron.com" <beanhuo@micron.com>,
	"James.Bottomley@HansenPartnership.com"
	<James.Bottomley@HansenPartnership.com>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"avri.altman@wdc.com" <avri.altman@wdc.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"bvanassche@acm.org" <bvanassche@acm.org>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v3] scsi: ufs: core: handle PM SSU timeout before SCSI EH
Date: Tue, 2 Jun 2026 04:42:36 +0000	[thread overview]
Message-ID: <4bb33ee3a8ba462fa1007334e9d95fba@exch02.asrmicro.com> (raw)
In-Reply-To: <a8867cc460c44391bd942f0708cc2037@exch02.asrmicro.com>


> > @@ -6517,6 +6548,8 @@ static void ufshcd_complete_requests(struct
> > ufs_hba *hba, bool force_compl)
> >  {
> >         if (hba->mcq_enabled)
> >                 ufshcd_mcq_compl_pending_transfer(hba, force_compl);
> > +       else if (force_compl)
> > +               ufshcd_force_compl_pending_transfer(hba);
> >
> 
> Hi Hongjie,
> 
> Why will an SSU timeout invoke ufshcd_complete_requests
> if SCSI_EH_DONE is returned in ufshcd_eh_timed_out?
> 
An SSU timeout reaches ufshcd_complete_requests(hba, true) through the
direct recovery path:
    ufshcd_eh_timed_out()
        ufshcd_link_recovery()
            ufshcd_host_reset_and_restore()
                ufshcd_complete_requests(hba, true)

> 
> >         else
> >                 ufshcd_transfer_req_compl(hba);
> >
> > @@ -9466,7 +9499,7 @@ static enum scsi_timeout_action
> > ufshcd_eh_timed_out(struct scsi_cmnd *scmd)
> >  {
> >         struct ufs_hba *hba = shost_priv(scmd->device->host);
> >
> > -       if (!hba->system_suspending) {
> > +       if (!hba->pm_op_in_progress || !ufshcd_is_scsi_cmd(scmd)) {
> >
> 
> UFS internal device-management command timeouts will never
> reach ufshcd_eh_timed_out, right?

They are still executed via blk_execute_rq(), so their timeout handling still goes
through scsi_timeout() and the host eh_timed_out() callback.


Best.

  parent reply	other threads:[~2026-06-02  4:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01  4:56 [PATCH v3] scsi: ufs: core: handle PM SSU timeout before SCSI EH Hongjie Fang
2026-06-01 10:06 ` Peter Wang (王信友)
     [not found]   ` <a8867cc460c44391bd942f0708cc2037@exch02.asrmicro.com>
2026-06-02  4:42     ` Fang Hongjie(方洪杰) [this message]
2026-06-01 17:42 ` Bart Van Assche
2026-06-02  5:25   ` Fang Hongjie(方洪杰)

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=4bb33ee3a8ba462fa1007334e9d95fba@exch02.asrmicro.com \
    --to=hongjiefang@asrmicro.com \
    --cc=James.Bottomley@HansenPartnership.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=peter.wang@mediatek.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