Re: [PATCH v3] scsi: ufs: Fix possible infinite loop in ufshcd_hold

From: Martin K. Petersen
Date: Mon Aug 17 2020 - 23:13:17 EST


On Sun, 9 Aug 2020 13:07:34 +0800, Stanley Chu wrote:

> In ufshcd_suspend(), after clk-gating is suspended and link is set
> as Hibern8 state, ufshcd_hold() is still possibly invoked before
> ufshcd_suspend() returns. For example, MediaTek's suspend vops may
> issue UIC commands which would call ufshcd_hold() during the command
> issuing flow.
>
> Now if UFSHCD_CAP_HIBERN8_WITH_CLK_GATING capability is enabled,
> then ufshcd_hold() may enter infinite loops because there is no
> clk-ungating work scheduled or pending. In this case, ufshcd_hold()
> shall just bypass, and keep the link as Hibern8 state.

Applied to 5.9/scsi-fixes, thanks!

[1/1] scsi: ufs: Fix possible infinite loop in ufshcd_hold
https://git.kernel.org/mkp/scsi/c/93b6c5db0602

--
Martin K. Petersen Oracle Linux Engineering