Skip to content

Commit ceef938

Browse files
petegriffinmartinkpetersen
authored andcommitted
scsi: ufs: exynos: Fix hibern8 notify callbacks
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]>
1 parent 36adb55 commit ceef938

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
@@ -1526,12 +1526,12 @@ static void exynos_ufs_dev_hw_reset(struct ufs_hba *hba)
15261526
hci_writel(ufs, 1 << 0, HCI_GPIO_OUT);
15271527
}
15281528

1529-
static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, u8 enter)
1529+
static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd)
15301530
{
15311531
struct exynos_ufs *ufs = ufshcd_get_variant(hba);
15321532
struct exynos_ufs_uic_attr *attr = ufs->drv_data->uic_attr;
15331533

1534-
if (!enter) {
1534+
if (cmd == UIC_CMD_DME_HIBER_EXIT) {
15351535
if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL)
15361536
exynos_ufs_disable_auto_ctrl_hcc(ufs);
15371537
exynos_ufs_ungate_clks(ufs);
@@ -1559,11 +1559,11 @@ static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, u8 enter)
15591559
}
15601560
}
15611561

1562-
static void exynos_ufs_post_hibern8(struct ufs_hba *hba, u8 enter)
1562+
static void exynos_ufs_post_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd)
15631563
{
15641564
struct exynos_ufs *ufs = ufshcd_get_variant(hba);
15651565

1566-
if (!enter) {
1566+
if (cmd == UIC_CMD_DME_HIBER_EXIT) {
15671567
u32 cur_mode = 0;
15681568
u32 pwrmode;
15691569

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

15831583
if (!(ufs->opts & EXYNOS_UFS_OPT_SKIP_CONNECTION_ESTAB))
15841584
exynos_ufs_establish_connt(ufs);
1585-
} else {
1585+
} else if (cmd == UIC_CMD_DME_HIBER_ENTER) {
15861586
ufs->entry_hibern8_t = ktime_get();
15871587
exynos_ufs_gate_clks(ufs);
15881588
if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL)
@@ -1669,15 +1669,15 @@ static int exynos_ufs_pwr_change_notify(struct ufs_hba *hba,
16691669
}
16701670

16711671
static void exynos_ufs_hibern8_notify(struct ufs_hba *hba,
1672-
enum uic_cmd_dme enter,
1672+
enum uic_cmd_dme cmd,
16731673
enum ufs_notify_change_status notify)
16741674
{
16751675
switch ((u8)notify) {
16761676
case PRE_CHANGE:
1677-
exynos_ufs_pre_hibern8(hba, enter);
1677+
exynos_ufs_pre_hibern8(hba, cmd);
16781678
break;
16791679
case POST_CHANGE:
1680-
exynos_ufs_post_hibern8(hba, enter);
1680+
exynos_ufs_post_hibern8(hba, cmd);
16811681
break;
16821682
}
16831683
}

0 commit comments

Comments
 (0)