diff options
author | Bart Van Assche <bvanassche@acm.org> | 2023-05-29 13:26:40 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-05-31 11:44:01 -0400 |
commit | 078f4f4b34d6c2dadabb363d3fc6c84b32927dea (patch) | |
tree | a05edb0875099fa511a4080fc1b3b41bee5f54eb /include/ufs | |
parent | 4b68b7f9c46d90c541d39c8b397a86ac0ca4c765 (diff) | |
download | linux-078f4f4b34d6c2dadabb363d3fc6c84b32927dea.tar.gz linux-078f4f4b34d6c2dadabb363d3fc6c84b32927dea.tar.bz2 linux-078f4f4b34d6c2dadabb363d3fc6c84b32927dea.zip |
scsi: ufs: Ungate the clock synchronously
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>
Link: https://lore.kernel.org/r/20230529202640.11883-6-bvanassche@acm.org
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bao D. Nguyen <quic_nguyenb@quicinc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/ufs')
-rw-r--r-- | include/ufs/ufshcd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h index f7553293ba98..8039c2b72502 100644 --- a/include/ufs/ufshcd.h +++ b/include/ufs/ufshcd.h @@ -1358,7 +1358,7 @@ void ufshcd_fixup_dev_quirks(struct ufs_hba *hba, int ufshcd_read_string_desc(struct ufs_hba *hba, u8 desc_index, u8 **buf, bool ascii); -int ufshcd_hold(struct ufs_hba *hba, bool async); +void ufshcd_hold(struct ufs_hba *hba); void ufshcd_release(struct ufs_hba *hba); void ufshcd_clkgate_delay_set(struct device *dev, unsigned long value); |