summaryrefslogtreecommitdiff
path: root/drivers/scsi/ufs/ufs-hisi.c
diff options
context:
space:
mode:
authorPeter Wang <peter.wang@mediatek.com>2021-10-06 08:47:05 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2021-10-12 20:41:01 +0300
commit9561f58442e48c3c71da250aa63bd02ec6bffcb5 (patch)
treed642e16c9f26b6f8cb8df7c1c7bbcbb6f49ad073 /drivers/scsi/ufs/ufs-hisi.c
parentf4875d509a0a78ad294a1a538d534b5ba94e685a (diff)
downloadlinux-9561f58442e48c3c71da250aa63bd02ec6bffcb5.tar.xz
scsi: ufs: mediatek: Support vops pre suspend to disable auto-hibern8
Mediatek UFS needs auto-hibern8 disabled before suspend. Introduce a solution to do pre-suspend before SSU (sleep). Link: https://lore.kernel.org/r/20211006054705.21885-1-peter.wang@mediatek.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Bean Huo <beanhuo@micron.com> Signed-off-by: Peter Wang <peter.wang@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufs-hisi.c')
-rw-r--r--drivers/scsi/ufs/ufs-hisi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufs-hisi.c b/drivers/scsi/ufs/ufs-hisi.c
index 6b706de8354b..8c7e8d321746 100644
--- a/drivers/scsi/ufs/ufs-hisi.c
+++ b/drivers/scsi/ufs/ufs-hisi.c
@@ -396,10 +396,14 @@ out:
return ret;
}
-static int ufs_hisi_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
+static int ufs_hisi_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op,
+ enum ufs_notify_change_status status)
{
struct ufs_hisi_host *host = ufshcd_get_variant(hba);
+ if (status == PRE_CHANGE)
+ return 0;
+
if (pm_op == UFS_RUNTIME_PM)
return 0;