Thread (36 messages) 36 messages, 5 authors, 2023-08-22

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

From: Bao D. Nguyen <hidden>
Date: 2023-08-18 21:10:24
Also in: linux-scsi

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 <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help