Re: [PATCH v4 5/5] scsi: ufs: Ungate the clock synchronously

Bean Huo
2023-05-30T11:10:12Z

On Mon, 2023-05-29 at 13:26 -0700, Bart Van Assche wrote:
> Ungating the clock asynchronously causes ufshcd_queuecommand() to
> return
> SCSI_MLQUEUE_HOST_BUSY and hence causes commands to be requeued.
> This is
> suboptimal. Allow ufshcd_queuecommand() to sleep such that clock
> ungating
> does not trigger command requeuing. Remove the
> ufshcd_scsi_block_requests()
> and ufshcd_scsi_unblock_requests() calls because these are no longer
> needed. The flush_work(&hba->clk_gating.ungate_work) call is
> sufficient to
> make the SCSI core wait for clock ungating to complete.
>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>

Reviewed-by: Bean Huo <beanhuo@micron.com>