From: Arthur Simchaev <arthur.simchaev@sandisk.com>
To: martin.petersen@oracle.com
Cc: avri.altman@sandisk.com, Avi.Shchislowski@sandisk.com,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
bvanassche@acm.org, Arthur Simchaev <arthur.simchaev@sandisk.com>
Subject: [PATCH] ufs: core: bsg: Add hibern8 enter/exit to ufshcd_send_bsg_uic_cmd
Date: Tue, 4 Mar 2025 13:46:52 +0200 [thread overview]
Message-ID: <20250304114652.210395-1-arthur.simchaev@sandisk.com> (raw)
Eye monitor measurement functionality was added to the M-PHY v5
specification. The measurement of the eye monitor signal for the UFS
device begins when the link enters the hibernate state.
Hence, allow user-layer applications the capability to send the hibern8
enter command through the BSG framework. For completion, allow the
sibling functionality of hibern8 exit as well.
Signed-off-by: Arthur Simchaev <arthur.simchaev@sandisk.com>
---
drivers/ufs/core/ufshcd.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 4e1e214fc5a2..546ab557a77c 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -4366,6 +4366,16 @@ int ufshcd_send_bsg_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd)
goto out;
}
+ if (uic_cmd->command == UIC_CMD_DME_HIBER_ENTER) {
+ ret = ufshcd_uic_hibern8_enter(hba);
+ goto out;
+ }
+
+ if (uic_cmd->command == UIC_CMD_DME_HIBER_EXIT) {
+ ret = ufshcd_uic_hibern8_exit(hba);
+ goto out;
+ }
+
mutex_lock(&hba->uic_cmd_mutex);
ufshcd_add_delay_before_dme_cmd(hba);
--
2.34.1
next reply other threads:[~2025-03-04 11:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 11:46 Arthur Simchaev [this message]
2025-03-06 12:50 ` [PATCH] ufs: core: bsg: Add hibern8 enter/exit to ufshcd_send_bsg_uic_cmd Bean Huo
2025-03-06 13:04 ` Can Guo
2025-03-07 9:10 ` Arthur Simchaev
2025-03-26 15:08 ` Arthur Simchaev
2025-03-07 9:18 ` Arthur Simchaev
2025-03-07 10:38 ` Bean Huo
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=20250304114652.210395-1-arthur.simchaev@sandisk.com \
--to=arthur.simchaev@sandisk.com \
--cc=Avi.Shchislowski@sandisk.com \
--cc=avri.altman@sandisk.com \
--cc=bvanassche@acm.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox