Message ID | 20240721183840.209284-1-ebiggers@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 47398f49dab8326bb652fa2d7a51ae5ec78775b5 |
Headers | show |
Series | scsi: ufs: exynos: Don't resume FMP when crypto support disabled | expand |
On 7/21/24 11:38 AM, Eric Biggers wrote: > If exynos_ufs_fmp_init() did not enable FMP support, then > exynos_ufs_fmp_resume() should not execute the FMP-related SMC calls. Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Eric, > If exynos_ufs_fmp_init() did not enable FMP support, then > exynos_ufs_fmp_resume() should not execute the FMP-related SMC calls. Applied to 6.11/scsi-staging, thanks!
diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 16ad3528d80b..9ec318ef52bf 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -1291,10 +1291,13 @@ static void exynos_ufs_fmp_init(struct ufs_hba *hba, struct exynos_ufs *ufs) 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) dev_err(hba->dev, "SMC_CMD_FMP_SECURITY failed on resume: %ld\n", res.a0);