Commit 8b0bbf00 authored by Stanley Chu's avatar Stanley Chu Committed by Martin K. Petersen

scsi: ufs: disable interrupt during clock-gating

Similar to suspend, ufshcd interrupt can be disabled since there won't be
any host controller transaction expected till clocks ungated.

Link: https://lore.kernel.org/r/1575721321-8071-3-git-send-email-stanley.chu@mediatek.comReviewed-by: default avatarAsutosh Das <asutoshd@codeaurora.org>
Reviewed-by: default avatarAvri Altman <avri.altman@wdc.com>
Signed-off-by: default avatarStanley Chu <stanley.chu@mediatek.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent dcb6cec5
...@@ -1466,6 +1466,8 @@ static void ufshcd_ungate_work(struct work_struct *work) ...@@ -1466,6 +1466,8 @@ static void ufshcd_ungate_work(struct work_struct *work)
spin_unlock_irqrestore(hba->host->host_lock, flags); spin_unlock_irqrestore(hba->host->host_lock, flags);
ufshcd_setup_clocks(hba, true); ufshcd_setup_clocks(hba, true);
ufshcd_enable_irq(hba);
/* Exit from hibern8 */ /* Exit from hibern8 */
if (ufshcd_can_hibern8_during_gating(hba)) { if (ufshcd_can_hibern8_during_gating(hba)) {
/* Prevent gating in this path */ /* Prevent gating in this path */
...@@ -1612,6 +1614,8 @@ static void ufshcd_gate_work(struct work_struct *work) ...@@ -1612,6 +1614,8 @@ static void ufshcd_gate_work(struct work_struct *work)
ufshcd_set_link_hibern8(hba); ufshcd_set_link_hibern8(hba);
} }
ufshcd_disable_irq(hba);
if (!ufshcd_is_link_active(hba)) if (!ufshcd_is_link_active(hba))
ufshcd_setup_clocks(hba, false); ufshcd_setup_clocks(hba, false);
else else
......
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