Re: [PATCH v2 2/2] scsi: ufs: core: Decouple CQ sweep from request iterator in MCQ

From: Bart Van Assche

Date: Tue Sep 22 2026 - 12:34:34 EST


On 9/22/26 12:37 AM, Peter Wang wrote:
On Mon, 2026-09-21 at 10:13 -0700, Bart Van Assche wrote:
In SDB mode, clearing UTRLDBR will cause all pending commands to be
requeued because the OCS member is initialized to
OCS_INVALID_COMMAND_STATUS and because ufshcd_transfer_rsp_status()
translates this status value into DID_REQUEUE << 16. I'm concerned
that this approach may cause the deadlines for SCSI commands to be
exceeded. Hence my proposal for MCQ mode not to requeue pending SCSI
commands but instead to let the SCSI error handler decide what to do
with these commands.

The current MCQ flow is similar to SDB. We discussed this two years
ago.
Aborted commands will be requeued immediately, just like in SDB mode
A SCSI host controller reset must abort all pending commands. Requeuing
SCSI commands during a host controller reset violates the API contract
between the SCSI error handler and SCSI LLDs. I'm not aware of any other
SCSI LLD than the UFS host controller driver that requeues pending
commands upon a host controller reset instead of aborting these.

.eh_host_reset_handler() is expected to reset all logical units and the
host controller. The SCSI architecture manual (SAM) mentions explicitly
that resetting logical units involves aborting all commands.

Thanks,

Bart.