From: Jeuk Kim <jeuk20.kim@gmail.com>
To: bvanassche@acm.org
Cc: James.Bottomley@HansenPartnership.com, alim.akhtar@samsung.com,
avri.altman@sandisk.com, beanhuo@micron.com,
can.guo@oss.qualcomm.com, cw9316.lee@samsung.com,
hyenc.jeong@samsung.com, j-young.choi@samsung.com,
jeuk20.kim@samsung.com, john.garry@linux.dev,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
mkp@kernel.org, peter.wang@mediatek.com, ping.gao@samsung.com,
rafael.j.wysocki@intel.com, stanleyjhu@google.com,
vamshigajjela@google.com
Subject: Re: [PATCH] scsi: ufs: mcq: Reap aborted CQEs before returning from abort
Date: Fri, 30 Oct 2026 10:13:00 +0900 [thread overview]
Message-ID: <20261030011300.1868002-1-jeuk20.kim@gmail.com> (raw)
In-Reply-To: <a7f072a8-01be-42e3-b17d-4bcda4c7cb55@acm.org>
Hi Bart,
Thanks for the review.
> If the late CQE arrives after the command has been resubmitted,
> ufshcd_compl_one_cqe() also overwrites cmd->result and calls scsi_done()
> for the new instance of the command
Fixed in v2.
> Please release the command only after the host reset has completed in
> the timeout case.
Fixed in v2. On timeout, abort returns FAILED without releasing DMA.
Recovery is left to the SCSI core.
> Note that ufshcd_mcq_force_compl_one() skips commands with
> SCMD_STATE_COMPLETE set
Fixed in v2. It now releases timed-out commands' resources without
changing their result or calling scsi_done().
> Have you considered setting a separate "completed" bit in
> ufshcd_compl_one_cqe() for every command type?
Done in v2. UFSHCD_LRB_COMPLETED covers all command types, and
ufshcd_release_scsi_cmd() retains its original semantics.
> Does UFSHCI guarantee that the OCS_ABORTED CQE has been posted by the
> time SQRTSy.CUS is set?
CUS alone does not establish that software has consumed the CQE.
v2 waits for driver completion in ufshcd_mcq_sq_cleanup(), covering
both abort and LU reset, and propagates LU cleanup failures.
> Please don't mix SCSI EH return codes with negative errno values in
> one return value.
Fixed in v2.
> Calling ufshcd_eh_host_reset_handler() from ufshcd_abort() is
> completely unacceptable.
Removed in v2.
> The kernel-doc for @flags should say which bits it holds
> (UFSHCD_LRB_*). I'd also define the bit next to struct ufshcd_lrb
> rather than in ufshcd-priv.h.
Fixed in v2.
> Please add an in-body From: Jeuk Kim <jeuk20.kim@samsung.com> line.
> Please add Cc: stable@vger.kernel.org.
Added in v2.
Thanks,
Jeuk
prev parent reply other threads:[~2026-10-30 1:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 9:17 Jeuk Kim
2026-10-26 15:55 ` Bart Van Assche
2026-10-30 1:13 ` Jeuk Kim [this message]
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=20261030011300.1868002-1-jeuk20.kim@gmail.com \
--to=jeuk20.kim@gmail.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=cw9316.lee@samsung.com \
--cc=hyenc.jeong@samsung.com \
--cc=j-young.choi@samsung.com \
--cc=jeuk20.kim@samsung.com \
--cc=john.garry@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mkp@kernel.org \
--cc=peter.wang@mediatek.com \
--cc=ping.gao@samsung.com \
--cc=rafael.j.wysocki@intel.com \
--cc=stanleyjhu@google.com \
--cc=vamshigajjela@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®