From: HOYOUNG SEO <hy50.seo@samsung.com>
To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
bvanassche@acm.org, mkp@kernel.org, martin.petersen@oracle.com,
stanleyjhu@google.com, peter.wang@mediatek.com,
alim.akhtar@samsung.com, kwangwon.min@samsung.com,
kwmad.kim@samsung.com, cpgsproxy1@samsung.com,
h10.kim@samsung.com
Cc: HOYOUNG SEO <hy50.seo@samsung.com>
Subject: [PATCH v10 2/4] scsi: ufs: core: Add a helper for the system suspend callbacks
Date: Wed, 11 Nov 2026 17:18:32 +0900 [thread overview]
Message-ID: <331418503.141794387787744.JavaMail.epsvc@epcpadp2new> (raw)
In-Reply-To: <cover.1794384665.git.hy50.seo@samsung.com>
Move the body of ufshcd_wl_suspend() into ufshcd_wl_system_suspend(),
which takes the PM operation as a parameter, so that it can be shared
with ufshcd_wl_poweroff() in the next patch. ufshcd_wl_suspend() calls it
with UFS_SYSTEM_PM.
No functional change, except that the error message printed when the
suspend fails now contains the name of the new function.
Suggested-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: HOYOUNG SEO <hy50.seo@samsung.com>
---
drivers/ufs/core/ufshcd.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 3b5580ac390c..4825349e87fd 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -10712,7 +10712,7 @@ static int ufshcd_wl_runtime_resume(struct device *dev)
#endif
#ifdef CONFIG_PM_SLEEP
-static int ufshcd_wl_suspend(struct device *dev)
+static int ufshcd_wl_system_suspend(struct device *dev, enum ufs_pm_op pm_op)
{
struct scsi_device *sdev = to_scsi_device(dev);
struct ufs_hba *hba;
@@ -10725,7 +10725,7 @@ static int ufshcd_wl_suspend(struct device *dev)
if (pm_runtime_suspended(dev))
goto out;
- ret = __ufshcd_wl_suspend(hba, UFS_SYSTEM_PM);
+ ret = __ufshcd_wl_suspend(hba, pm_op);
if (ret) {
dev_err(&sdev->sdev_gendev, "%s failed: %d\n", __func__, ret);
up(&hba->host_sem);
@@ -10741,6 +10741,11 @@ static int ufshcd_wl_suspend(struct device *dev)
return ret;
}
+static int ufshcd_wl_suspend(struct device *dev)
+{
+ return ufshcd_wl_system_suspend(dev, UFS_SYSTEM_PM);
+}
+
static int ufshcd_wl_resume(struct device *dev)
{
struct scsi_device *sdev = to_scsi_device(dev);
--
2.34.1
next prev parent reply other threads:[~2026-11-11 9:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20261111082304epcas2p4887d72756d51a72b94729439d25dd3e8@epcas2p4.samsung.com>
[not found] ` <cover.1794384665.git.hy50.seo@samsung.com>
2026-11-11 8:18 ` [PATCH v10 1/4] scsi: ufs: core: Clear saved errors in ufshcd_link_recovery() HOYOUNG SEO
2026-11-11 14:32 ` Bart Van Assche
2026-11-11 8:18 ` HOYOUNG SEO [this message]
2026-11-11 12:50 ` [PATCH v10 2/4] scsi: ufs: core: Add a helper for the system suspend callbacks Peter Wang
2026-11-11 8:18 ` [PATCH v10 3/4] scsi: ufs: core: Make ufshcd_wl_poweroff() behave like ufshcd_wl_suspend() HOYOUNG SEO
2026-11-11 12:50 ` Peter Wang
2026-11-11 8:18 ` [PATCH v10 4/4] scsi: ufs: core: Limit early link recovery in the error handler to runtime PM HOYOUNG SEO
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=331418503.141794387787744.JavaMail.epsvc@epcpadp2new \
--to=hy50.seo@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=bvanassche@acm.org \
--cc=cpgsproxy1@samsung.com \
--cc=h10.kim@samsung.com \
--cc=kwangwon.min@samsung.com \
--cc=kwmad.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mkp@kernel.org \
--cc=peter.wang@mediatek.com \
--cc=stanleyjhu@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.