Skip to content

Commit c662ced

Browse files
petegriffinmartinkpetersen
authored andcommitted
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: d11e0a3 ("scsi: ufs: exynos: Add support for Tensor gs101 SoC") Signed-off-by: Peter Griffin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Reviewed-by: Tudor Ambarus <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 516ceaa commit c662ced

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/ufs/host/ufs-exynos.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,9 @@ static void exynos_ufs_config_smu(struct exynos_ufs *ufs)
719719
{
720720
u32 reg, val;
721721

722+
if (ufs->opts & EXYNOS_UFS_OPT_UFSPR_SECURE)
723+
return;
724+
722725
exynos_ufs_disable_auto_ctrl_hcc_save(ufs, &val);
723726

724727
/* make encryption disabled by default */
@@ -1454,8 +1457,8 @@ static int exynos_ufs_init(struct ufs_hba *hba)
14541457
if (ret)
14551458
goto out;
14561459
exynos_ufs_specify_phy_time_attr(ufs);
1457-
if (!(ufs->opts & EXYNOS_UFS_OPT_UFSPR_SECURE))
1458-
exynos_ufs_config_smu(ufs);
1460+
1461+
exynos_ufs_config_smu(ufs);
14591462

14601463
hba->host->dma_alignment = DATA_UNIT_SIZE - 1;
14611464
return 0;

0 commit comments

Comments
 (0)