Skip to content

Commit ad9dc4a

Browse files
petegriffinSasha Levin
authored andcommitted
scsi: ufs: exynos: Fix hibern8 notify callbacks
commit ceef938 upstream. v1 of the patch which introduced the ufshcd_vops_hibern8_notify() callback used a bool instead of an enum. In v2 this was updated to an enum based on the review feedback in [1]. ufs-exynos hibernate calls have always been broken upstream as it follows the v1 bool implementation. Link: https://patchwork.kernel.org/project/linux-scsi/patch/[email protected]/ [1] Fixes: 55f4b1f ("scsi: ufs: ufs-exynos: Add UFS host support for Exynos SoCs") 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6d52014 commit ad9dc4a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/ufs/host/ufs-exynos.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,12 +1228,12 @@ static void exynos_ufs_dev_hw_reset(struct ufs_hba *hba)
12281228
hci_writel(ufs, 1 << 0, HCI_GPIO_OUT);
12291229
}
12301230

1231-
static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, u8 enter)
1231+
static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd)
12321232
{
12331233
struct exynos_ufs *ufs = ufshcd_get_variant(hba);
12341234
struct exynos_ufs_uic_attr *attr = ufs->drv_data->uic_attr;
12351235

1236-
if (!enter) {
1236+
if (cmd == UIC_CMD_DME_HIBER_EXIT) {
12371237
if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL)
12381238
exynos_ufs_disable_auto_ctrl_hcc(ufs);
12391239
exynos_ufs_ungate_clks(ufs);
@@ -1261,11 +1261,11 @@ static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, u8 enter)
12611261
}
12621262
}
12631263

1264-
static void exynos_ufs_post_hibern8(struct ufs_hba *hba, u8 enter)
1264+
static void exynos_ufs_post_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd)
12651265
{
12661266
struct exynos_ufs *ufs = ufshcd_get_variant(hba);
12671267

1268-
if (!enter) {
1268+
if (cmd == UIC_CMD_DME_HIBER_EXIT) {
12691269
u32 cur_mode = 0;
12701270
u32 pwrmode;
12711271

@@ -1284,7 +1284,7 @@ static void exynos_ufs_post_hibern8(struct ufs_hba *hba, u8 enter)
12841284

12851285
if (!(ufs->opts & EXYNOS_UFS_OPT_SKIP_CONNECTION_ESTAB))
12861286
exynos_ufs_establish_connt(ufs);
1287-
} else {
1287+
} else if (cmd == UIC_CMD_DME_HIBER_ENTER) {
12881288
ufs->entry_hibern8_t = ktime_get();
12891289
exynos_ufs_gate_clks(ufs);
12901290
if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL)
@@ -1363,15 +1363,15 @@ static int exynos_ufs_pwr_change_notify(struct ufs_hba *hba,
13631363
}
13641364

13651365
static void exynos_ufs_hibern8_notify(struct ufs_hba *hba,
1366-
enum uic_cmd_dme enter,
1366+
enum uic_cmd_dme cmd,
13671367
enum ufs_notify_change_status notify)
13681368
{
13691369
switch ((u8)notify) {
13701370
case PRE_CHANGE:
1371-
exynos_ufs_pre_hibern8(hba, enter);
1371+
exynos_ufs_pre_hibern8(hba, cmd);
13721372
break;
13731373
case POST_CHANGE:
1374-
exynos_ufs_post_hibern8(hba, enter);
1374+
exynos_ufs_post_hibern8(hba, cmd);
13751375
break;
13761376
}
13771377
}

0 commit comments

Comments
 (0)