[PATCH v1 07/10] ufs: host: mediatek: Fix shutdown/suspend race condition
Bart Van Assche
bvanassche at acm.org
Thu Sep 18 11:39:12 PDT 2025
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.
More information about the Linux-mediatek
mailing list