On 5/29/2023 1:26 PM, 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@xxxxxxxxx> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
Reviewed-by: Bao D. Nguyen <quic_nguyenb@xxxxxxxxxxx>