scsi: ufs: core: Honor runtime/system PM levels if set by host controller drivers
Otherwise, the default levels will override the levels set by the host controller drivers. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20241219-ufs-qcom-suspend-fix-v3-2-63c4b95a70b9@linaro.org Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
7bac656875
commit
bb9850704c
1 changed files with 6 additions and 3 deletions
|
@ -10590,13 +10590,16 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the default power management level for runtime and system PM.
|
* Set the default power management level for runtime and system PM if
|
||||||
|
* not set by the host controller drivers.
|
||||||
* Default power saving mode is to keep UFS link in Hibern8 state
|
* Default power saving mode is to keep UFS link in Hibern8 state
|
||||||
* and UFS device in sleep state.
|
* and UFS device in sleep state.
|
||||||
*/
|
*/
|
||||||
|
if (!hba->rpm_lvl)
|
||||||
hba->rpm_lvl = ufs_get_desired_pm_lvl_for_dev_link_state(
|
hba->rpm_lvl = ufs_get_desired_pm_lvl_for_dev_link_state(
|
||||||
UFS_SLEEP_PWR_MODE,
|
UFS_SLEEP_PWR_MODE,
|
||||||
UIC_LINK_HIBERN8_STATE);
|
UIC_LINK_HIBERN8_STATE);
|
||||||
|
if (!hba->spm_lvl)
|
||||||
hba->spm_lvl = ufs_get_desired_pm_lvl_for_dev_link_state(
|
hba->spm_lvl = ufs_get_desired_pm_lvl_for_dev_link_state(
|
||||||
UFS_SLEEP_PWR_MODE,
|
UFS_SLEEP_PWR_MODE,
|
||||||
UIC_LINK_HIBERN8_STATE);
|
UIC_LINK_HIBERN8_STATE);
|
||||||
|
|
Loading…
Add table
Reference in a new issue