* [PATCH] scsi: ufs: exynos: Don't resume FMP when crypto support disabled
@ 2024-07-21 18:38 Eric Biggers
2024-07-22 17:54 ` Bart Van Assche
2024-07-23 0:52 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Eric Biggers @ 2024-07-21 18:38 UTC (permalink / raw)
To: linux-scsi
Cc: linux-samsung-soc, linux-fscrypt, Alim Akhtar, Avri Altman,
Bart Van Assche, Martin K . Petersen, Peter Griffin,
André Draszik, William McVicker
From: Eric Biggers <ebiggers@google.com>
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 <ebiggers@google.com>
---
drivers/ufs/host/ufs-exynos.c | 3 +++
1 file changed, 3 insertions(+)
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);
base-commit: 2c9b3512402ed192d1f43f4531fb5da947e72bd0
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ufs: exynos: Don't resume FMP when crypto support disabled
2024-07-21 18:38 [PATCH] scsi: ufs: exynos: Don't resume FMP when crypto support disabled Eric Biggers
@ 2024-07-22 17:54 ` Bart Van Assche
2024-07-23 0:52 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Bart Van Assche @ 2024-07-22 17:54 UTC (permalink / raw)
To: Eric Biggers, linux-scsi
Cc: linux-samsung-soc, linux-fscrypt, Alim Akhtar, Avri Altman,
Martin K . Petersen, Peter Griffin, André Draszik,
William McVicker
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ufs: exynos: Don't resume FMP when crypto support disabled
2024-07-21 18:38 [PATCH] scsi: ufs: exynos: Don't resume FMP when crypto support disabled Eric Biggers
2024-07-22 17:54 ` Bart Van Assche
@ 2024-07-23 0:52 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2024-07-23 0:52 UTC (permalink / raw)
To: Eric Biggers
Cc: linux-scsi, linux-samsung-soc, linux-fscrypt, Alim Akhtar,
Avri Altman, Bart Van Assche, Martin K . Petersen, Peter Griffin,
André Draszik, William McVicker
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!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-23 0:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-21 18:38 [PATCH] scsi: ufs: exynos: Don't resume FMP when crypto support disabled Eric Biggers
2024-07-22 17:54 ` Bart Van Assche
2024-07-23 0:52 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox