mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Peter Wang (王信友)" <peter.wang@mediatek.com>
To: Bart Van Assche <bvanassche@acm.org>,
	Stanley Jhu <stanleyjhu@google.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"Martin K. Petersen" <mkp@kernel.org>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Avri Altman <avri.altman@sandisk.com>,
	Bean Huo <beanhuo@micron.com>,
	"Bao D. Nguyen" <quic_nguyenb@quicinc.com>,
	Can Guo <can.guo@oss.qualcomm.com>,
	Manivannan Sadhasivam <mani@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] scsi: ufs: core: Decouple CQ sweep from request iterator in MCQ
Date: Wed, 30 Sep 2026 07:30:41 +0000	[thread overview]
Message-ID: <4d761d64eda0700dd2321393e63e7e8e9052be1f.camel@mediatek.com> (raw)

On Fri, 2026-09-25 at 10:26 -0700, Bart Van Assche wrote:
> A correction: the INIT_LIST_HEAD(&cmd->eh_entry) statement is not
> reached while SCSI host recovery is in progress because
> SCMD_STATE_COMPLETE is set for all pending commands before the SCSI
> host recovery starts. scsi_done() skips SCSI commands for which that
> bit is set due to the following code:
> 
>         if (unlikely(test_and_set_bit(SCMD_STATE_COMPLETE, &cmd-
> >state)))
>                 return;
> 
> Hence, the scmd->result value is ignored if scsi_done() is called
> while SCSI host recovery is in progress.
> 
> Bart.

Thanks to Bart and Stanley for the detailed explanation.
It is clear to me now.

Thanks
Peter


             reply	other threads:[~2026-09-30  7:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30  7:30 Peter Wang (王信友) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-09-22  6:13 Peter Wang (王信友)
2026-09-01 12:23 [PATCH] scsi: ufs: core: Avoid unsafe MMIO reads in ufshcd_mcq_compl_all_cqes_lock() Stanley Jhu
2026-09-18 14:38 ` [PATCH v2 0/2] scsi: ufs: core: Fix unsafe MMIO reads and redundant CQ sweeps in MCQ reset Stanley Jhu
2026-09-18 14:38   ` [PATCH v2 2/2] scsi: ufs: core: Decouple CQ sweep from request iterator in MCQ Stanley Jhu
2026-09-18 16:06     ` Bart Van Assche
2026-09-20 13:49       ` Stanley Jhu
2026-09-21 17:13         ` Bart Van Assche
2026-09-22  7:37           ` Peter Wang
2026-09-22 16:30             ` Bart Van Assche
2026-09-23  6:09               ` Peter Wang
2026-09-23 11:18                 ` Stanley Jhu
2026-09-23 17:02                   ` Bart Van Assche
2026-09-25 17:26                     ` Bart Van Assche
2026-09-30  7:31                       ` Peter Wang
2026-09-23 16:50                 ` Bart Van Assche
2026-09-22  7:36         ` Peter Wang
2026-09-25 17:44     ` 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=4d761d64eda0700dd2321393e63e7e8e9052be1f.camel@mediatek.com \
    --to=peter.wang@mediatek.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@sandisk.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=can.guo@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=mkp@kernel.org \
    --cc=quic_nguyenb@quicinc.com \
    --cc=stanleyjhu@google.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®