summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ufs
diff options
context:
space:
mode:
authorAsutosh Das <asutoshd@codeaurora.org>2019-11-14 22:09:29 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2019-11-19 21:37:32 -0500
commit18f01374b55b4595ad7f56250891bdbdb9d7a052 (patch)
tree73812b49c586bd388f85a44861cc10d24390a7af /drivers/scsi/ufs
parent9333d77573485c827b4c0fc960c840df3e5ce719 (diff)
downloadblackbird-op-linux-18f01374b55b4595ad7f56250891bdbdb9d7a052.tar.gz
blackbird-op-linux-18f01374b55b4595ad7f56250891bdbdb9d7a052.zip
scsi: ufs: Abort gating if clock on request is pending
This change attempts to abort gating of clocks if a request to turn-on clocks is pending. This would in turn avoid turning OFF and back ON the clocks. Link: https://lore.kernel.org/r/1573798172-20534-7-git-send-email-cang@codeaurora.org Reviewed-by: Bean Huo <beanhuo@micron.com> Signed-off-by: Asutosh Das <asutoshd@codeaurora.org> Signed-off-by: Can Guo <cang@codeaurora.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs')
-rw-r--r--drivers/scsi/ufs/ufshcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 6a690a94790c..180593ac4062 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -1610,7 +1610,7 @@ static void ufshcd_gate_work(struct work_struct *work)
* state to CLKS_ON.
*/
if (hba->clk_gating.is_suspended ||
- (hba->clk_gating.state == REQ_CLKS_ON)) {
+ (hba->clk_gating.state != REQ_CLKS_OFF)) {
hba->clk_gating.state = CLKS_ON;
trace_ufshcd_clk_gating(dev_name(hba->dev),
hba->clk_gating.state);
OpenPOWER on IntegriCloud