Re: [PATCH v7 18/23] scsi: ufs: mediatek: Don't acquire dvfsrc-vcore twice
From: Peter Wang (王信友)
Date: Wed Feb 25 2026 - 22:45:34 EST
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