On 5/12/21 6:35 PM, Can Guo wrote: > The change is unnecessary, ufshcd_suspend() is indeed keeping link alive > even if > we are disabling clocks. In __ufshcd_setup_clocks(), we have checks on > clock sources > so that we leave certain clock sources ON if the link is alive. And we > have many > of our customers tested the case rpm/spm_lvl == 0, it is working well. > Please check > below changes: > > https://lore.kernel.org/patchwork/patch/1345336/ > https://lore.kernel.org/patchwork/patch/1345337/ > > With this change, after suspend (rpm/spm_lvl == 0), leaving clock gating > running is risky: > 1. clock gating may run into concurrency with resume. > 2. In ufshcd_resume(), we also have a ufshcd_release(), it will cause > unbalanced usage of clock gating. > > And it seems quite opposite from what you want - you want to keep link > alive but you are leaving clock gating enabled, then when clock gating > kicks start, it will put the link into hibern8, but not keep link alive. Hi Can, Thank you for the detailed feedback. I will drop this patch. Bart.