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

scsi: ufs: Do not overwrite Auto-Hibernate timer

Some vendor-specific initialization flow may set its own auto-hibernate
timer. In this case, do not overwrite timer value as "default value" in
ufshcd_init().
Signed-off-by: default avatarStanley Chu <stanley.chu@mediatek.com>
Reviewed-by: default avatarAlim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: default avatarAvri Altman <Avri.Altman@wdc.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent ee5f1042
......@@ -8312,7 +8312,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
UIC_LINK_HIBERN8_STATE);
/* Set the default auto-hiberate idle timer value to 150 ms */
if (ufshcd_is_auto_hibern8_supported(hba)) {
if (ufshcd_is_auto_hibern8_supported(hba) && !hba->ahit) {
hba->ahit = FIELD_PREP(UFSHCI_AHIBERN8_TIMER_MASK, 150) |
FIELD_PREP(UFSHCI_AHIBERN8_SCALE_MASK, 3);
}
......
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