Re: [PATCH v2] scsi: ufs: mcq: Reap aborted CQEs before returning from abort
From: Jeuk Kim
Date: Sun Nov 01 2026 - 19:45:20 EST
On 10/30/2026 5:00 PM, Peter Wang wrote:
Hi Peter,
On Fri, 2026-10-30 at 10:13 +0900, Jeuk Kim wrote:
> From: Jeuk Kim <jeuk20.kim@xxxxxxxxxxx>
> > ufshcd_mcq_abort() can return before the OCS_ABORTED CQE is reaped.
The Initiate Cleanup procedure polls SQ_CUS until the
MCQ_POLL_US (500000) timeout expires. So is this issue caused by
the hardware completing the cleanup operation only after the
timeout had already expired?
No, this issue can occur even when SQ cleanup completes within the timeout.
SQRTSy.CUS indicates hardware cleanup completion, but it does not
guarantee that the driver has finished processing the OCS_ABORTED CQE.
Before this patch, ufshcd_mcq_abort() could return SUCCESS before CQE
processing completed, allowing the SCSI core to retry or finish the
command.
Thanks,
Jeuk