Commit 18f01374 authored by Asutosh Das's avatar Asutosh Das Committed by Martin K. Petersen

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.orgReviewed-by: default avatarBean Huo <beanhuo@micron.com>
Signed-off-by: default avatarAsutosh Das <asutoshd@codeaurora.org>
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 9333d775
...@@ -1610,7 +1610,7 @@ static void ufshcd_gate_work(struct work_struct *work) ...@@ -1610,7 +1610,7 @@ static void ufshcd_gate_work(struct work_struct *work)
* state to CLKS_ON. * state to CLKS_ON.
*/ */
if (hba->clk_gating.is_suspended || 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; hba->clk_gating.state = CLKS_ON;
trace_ufshcd_clk_gating(dev_name(hba->dev), trace_ufshcd_clk_gating(dev_name(hba->dev),
hba->clk_gating.state); hba->clk_gating.state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment