[PATCH v1] ufs: core: fix deadlock when rtc update
Peter Wang (王信友)
peter.wang at mediatek.com
Sun Jul 14 23:27:22 PDT 2024
On Fri, 2024-07-12 at 12:31 +0000, Avri Altman wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> >
> > 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?
>
Hi Avri,
Yes, if dev is not active (RPM state is not RPM_ACTIVE), will not
schedule rtc work and schedule on next __ufshcd_wl_resume.
Thanks.
Peter
> >
> > kind regards,
> > Bean
>
More information about the Linux-mediatek
mailing list