]> Git Repo - J-linux.git/commitdiff
scsi: ufs: exynos: Don't resume FMP when crypto support is disabled
authorEric Biggers <[email protected]>
Sun, 21 Jul 2024 18:38:40 +0000 (11:38 -0700)
committerMartin K. Petersen <[email protected]>
Tue, 23 Jul 2024 00:52:15 +0000 (20:52 -0400)
If exynos_ufs_fmp_init() did not enable FMP support, then
exynos_ufs_fmp_resume() should not execute the FMP-related SMC calls.

Fixes: c96499fcb403 ("scsi: ufs: exynos: Add support for Flash Memory Protector (FMP)")
Signed-off-by: Eric Biggers <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
drivers/ufs/host/ufs-exynos.c

index 16ad3528d80b2315e8b3ad82d0c1eafff9f9829e..9ec318ef52bff2dbc897ecb1268793ea14c5e2ce 100644 (file)
@@ -1293,6 +1293,9 @@ static void exynos_ufs_fmp_resume(struct ufs_hba *hba)
 {
        struct arm_smccc_res res;
 
+       if (!(hba->caps & UFSHCD_CAP_CRYPTO))
+               return;
+
        arm_smccc_smc(SMC_CMD_FMP_SECURITY, 0, SMU_EMBEDDED, CFG_DESCTYPE_3,
                      0, 0, 0, 0, &res);
        if (res.a0)
This page took 0.058183 seconds and 4 git commands to generate.