[PATCH v7 18/23] scsi: ufs: mediatek: Don't acquire dvfsrc-vcore twice

Peter Wang (王信友) peter.wang at mediatek.com
Wed Feb 25 19:45:02 PST 2026


On Wed, 2026-02-25 at 13:37 +0100, AngeloGioacchino Del Regno wrote:
> We need to check both because UFS_MTK_CAP_BOOST_CRYPT_ENGINE depends
> on:
>   1. reg_vcore
>   2. clocks (crypt_mux, crypt_lp, crypt_perf).
> 
> Failing to check for both ufs_mtk_is_boost_crypt_enabled() and
> reg_vcore here
> will introduce a bug that may result in storage corruption.
> 
> So yes, Nicolas is checking both because it is *required* to check
> both.
> 
> Regards,
> Angelo

Hi AngeloGioacchino,

To clarify, BCE stands for UFS_MTK_CAP_BOOST_CRYPT_ENGINE.

BCE     reg_vcore   Action
true	true	    If check is false, continue
true	false	    This case cannot happen (X)
false	true	    If check is true, return
false	false	    If check is true, return
Therefore, we only need to check whether BCE is
true (to continue) or false (to return).

Thanks
Peter


More information about the linux-arm-kernel mailing list