Re: [PATCH v4 06/12] scsi: ufs: core: Add helpers to pause and resume command processing

From: Bean Huo

Date: Mon Mar 23 2026 - 05:22:22 EST


On Fri, 2026-03-20 at 20:10 -0700, Can Guo wrote:
> In preparation for supporting TX Equalization refreshing, introduce
> helper functions to safely pause and resume command processing.
>
> ufshcd_pause_command_processing() ensures the host is in a quiescent
> state by stopping the block layer tagset, acquiring the necessary
> locks (scan_mutex and clk_scaling_lock), and waiting for any
> in-flight commands to complete within a specified timeout.
>
> ufshcd_resume_command_processing() restores the host to its previous
> operational state by reversing these steps in the correct order.
>
> Signed-off-by: Can Guo <can.guo@xxxxxxxxxxxxxxxx>

Reviewed-by: Bean Huo <beanhuo@xxxxxxxxxx>