diff options
author | Peter Wang <peter.wang@mediatek.com> | 2021-10-06 13:47:05 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-12 13:41:01 -0400 |
commit | 9561f58442e48c3c71da250aa63bd02ec6bffcb5 (patch) | |
tree | d642e16c9f26b6f8cb8df7c1c7bbcbb6f49ad073 /drivers/scsi/ufs/ufs-hisi.c | |
parent | f4875d509a0a78ad294a1a538d534b5ba94e685a (diff) |
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.c | 6 |
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; |