[PATCH v1] ufs: core: fix deadlock when rtc update

Avri Altman Avri.Altman at wdc.com
Fri Jul 12 05:31:05 PDT 2024


> 
> On Fri, 2024-07-12 at 10:33 +0000, Avri Altman wrote:
> > > @@ -8188,8 +8188,15 @@ static void ufshcd_rtc_work(struct
> > > work_struct
> > > *work)
> > >
> > >          hba = container_of(to_delayed_work(work), struct ufs_hba,
> > > ufs_rtc_update_work);
> > Will returning here If (!ufshcd_is_ufs_dev_active(hba)) works?
> > And remove it in the 2nd if clause?
> 
> Avri,
> 
> we need to reschedule next time work in the below code.  if return, cannot.
> 
> whatelse I missed?
a) If (!ufshcd_is_ufs_dev_active(hba)) - will not schedule ?
b) schedule on next __ufshcd_wl_resume?

> 
> kind regards,
> Bean


More information about the Linux-mediatek mailing list