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

From: Peter Wang

Date: Tue Sep 22 2026 - 03:47:28 EST


On Sun, 2026-09-20 at 21:49 +0800, Stanley Jhu wrote:
> That said, doing this inside ufshcd_host_reset_and_restore() right
> after
> ufshcd_hba_stop() is indeed the wrong place: at controller stop time


Hi Stanley,

I have different idea. The original design was that only after
the HBA stop can we ensure the host will no longer process the
remaining commands (those that need to be forcibly requeued)
due to receiving IRQs or other factors, thus avoiding unnecessary
racing. Both SDB and MCQ modes are implemented based on this idea.
However, MCQ indeed does not need to read the CQ register to update
the CQ, because it holds no meaning after the host reset either.

Thanks
Peter