[PATCH v1 07/10] ufs: host: mediatek: Fix shutdown/suspend race condition

Peter Wang (王信友) peter.wang at mediatek.com
Fri Sep 19 01:15:52 PDT 2025


On Thu, 2025-09-18 at 11:39 -0700, Bart Van Assche wrote:
> On 9/18/25 3:36 AM, peter.wang at mediatek.com wrote:
> > diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h
> > index 109cbb36c02d..7df475ebd06d 100644
> > --- a/include/ufs/ufshcd.h
> > +++ b/include/ufs/ufshcd.h
> > @@ -1436,6 +1436,11 @@ static inline int
> > ufshcd_disable_host_tx_lcc(struct ufs_hba *hba)
> >       return ufshcd_dme_set(hba,
> > UIC_ARG_MIB(PA_LOCAL_TX_LCC_ENABLE), 0);
> >   }
> > 
> > +static inline bool ufshcd_is_user_access_allowed(struct ufs_hba
> > *hba)
> > +{
> > +     return !hba->shutting_down;
> > +}
> > +
> 
> Please do not move the ufshcd_is_user_access_allowed() definition -
> I'd
> like to remove this function. Please either use hba->shutting_down
> directly or add a .shutdown callback in ufs_mtk_pltform.
> 
> Thanks,
> 
> Bart.

Hi Bart,

Okay, I will use hba->shutting_down directly.
By the way, could I know the reason why you want to
remove ufshcd_is_user_access_allowed?

Thanks.
Peter



More information about the Linux-mediatek mailing list