From: hgchu Date: Thu, 25 Jan 2018 11:15:58 +0000 (+0900) Subject: [HACK][COMMON] scsi: ufs: Disable power in suspend X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a2b1e18e319f4cda36e36bf20c5f8df1c1fe9ee8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [HACK][COMMON] scsi: ufs: Disable power in suspend Change-Id: I8e9170de02617e9f778ebb7f6beb1a5d1ef57be0 Signed-off-by: hgchu --- diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index b12059e80c52..9cfb410f88b4 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -7993,15 +7993,15 @@ static int ufshcd_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op) if (ufshcd_is_shutdown_pm(pm_op)) ufs_shutdown_state = 1; - if ((req_dev_pwr_mode != hba->curr_dev_pwr_mode) && - ((ufshcd_is_runtime_pm(pm_op) && !hba->auto_bkops_enabled) || - !ufshcd_is_runtime_pm(pm_op))) { +// if ((req_dev_pwr_mode != hba->curr_dev_pwr_mode) && +// ((ufshcd_is_runtime_pm(pm_op) && !hba->auto_bkops_enabled) || +// !ufshcd_is_runtime_pm(pm_op))) { /* ensure that bkops is disabled */ - ufshcd_disable_auto_bkops(hba); - ret = ufshcd_set_dev_pwr_mode(hba, req_dev_pwr_mode); - if (ret) - goto enable_gating; - } +// ufshcd_disable_auto_bkops(hba); +// ret = ufshcd_set_dev_pwr_mode(hba, req_dev_pwr_mode); +// if (ret) +// goto enable_gating; +// } ret = ufshcd_link_state_transition(hba, req_link_state, 1); if (ret) @@ -8026,11 +8026,11 @@ disable_clks: udelay(50); if (gating_allowed) { - if (!ufshcd_is_link_active(hba)) - ufshcd_setup_clocks(hba, false); - else - /* If link is active, device ref_clk can't be switched off */ - __ufshcd_setup_clocks(hba, false, true); +// if (!ufshcd_is_link_active(hba)) +// ufshcd_setup_clocks(hba, false); +/// else +// /* If link is active, device ref_clk can't be switched off */ +/// __ufshcd_setup_clocks(hba, false, true); } hba->clk_gating.state = CLKS_OFF;