Re: [PATCH v10 12/18] scsi: ufs: hisi: Rework the code that disables auto-hibernation

Bao D. Nguyen
2023-08-18T21:10:24Z

On 8/18/2023 12:34 PM, Bart Van Assche wrote:
> The host driver link startup callback is called indirectly by
> ufshcd_probe_hba(). That function applies the auto-hibernation
> settings by writing hba->ahit into the auto-hibernation control
> register. Simplify the code for disabling auto-hibernation by
> setting hba->ahit instead of writing into the auto-hibernation
> control register. This patch is part of an effort to move all
> auto-hibernation register changes into the UFSHCI driver core.
...
> /* disable auto H8 */
> - reg = ufshcd_readl(hba, REG_AUTO_HIBERNATE_IDLE_TIMER);
> - reg = reg & (~UFS_AHIT_AH8ITV_MASK);
> - ufshcd_writel(hba, reg, REG_AUTO_HIBERNATE_IDLE_TIMER);
> + hba->ahit = 0;
The original code only clears the timer value, not the scale.
However, I think it is safe to assume that it meant to clear both.

Reviewed-by: Bao D. Nguyen <quic_nguyenb@quicinc.com>