diff options
author | Peter Griffin <peter.griffin@linaro.org> | 2024-10-31 18:00:23 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2024-11-03 04:13:00 +0300 |
commit | c662cedea14efdcf373d8d886ec18019d50e0772 (patch) | |
tree | 5c554b235f7d6cfdcec92a38ee421293d14ecb54 /drivers/ufs/host/ufs-exynos.c | |
parent | 516ceaaf539de83de3af04c46198f39180cc44a1 (diff) | |
download | linux-c662cedea14efdcf373d8d886ec18019d50e0772.tar.xz |
scsi: ufs: exynos: Add check inside exynos_ufs_config_smu()
Move the EXYNOS_UFS_OPT_UFSPR_SECURE check inside
exynos_ufs_config_smu().
This way all call sites will benefit from the check. This fixes a bug
currently in the exynos_ufs_resume() path on gs101 as it calls
exynos_ufs_config_smu() and we end up accessing registers that can only
be accessed from secure world which results in a serror.
Fixes: d11e0a318df8 ("scsi: ufs: exynos: Add support for Tensor gs101 SoC")
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Link: https://lore.kernel.org/r/20241031150033.3440894-5-peter.griffin@linaro.org
Cc: stable@vger.kernel.org
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs/host/ufs-exynos.c')
-rw-r--r-- | drivers/ufs/host/ufs-exynos.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 33de7ff747a2..f4454e89040f 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -719,6 +719,9 @@ static void exynos_ufs_config_smu(struct exynos_ufs *ufs) { u32 reg, val; + if (ufs->opts & EXYNOS_UFS_OPT_UFSPR_SECURE) + return; + exynos_ufs_disable_auto_ctrl_hcc_save(ufs, &val); /* make encryption disabled by default */ @@ -1454,8 +1457,8 @@ static int exynos_ufs_init(struct ufs_hba *hba) if (ret) goto out; exynos_ufs_specify_phy_time_attr(ufs); - if (!(ufs->opts & EXYNOS_UFS_OPT_UFSPR_SECURE)) - exynos_ufs_config_smu(ufs); + + exynos_ufs_config_smu(ufs); hba->host->dma_alignment = DATA_UNIT_SIZE - 1; return 0; |