mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] ufs: bsg: Add hibern8 enter/exit to ufshcd_send_bsg_uic_cmd
@ 2025-04-14 12:02 Arthur Simchaev
  2025-04-14 16:16 ` Bart Van Assche
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Arthur Simchaev @ 2025-04-14 12:02 UTC (permalink / raw)
  To: arthur.simchaev
  Cc: avri.altman, Avi.Shchislowski, beanhuo, linux-scsi, linux-kernel,
	bvanassche

This patch adds functionality to allow user-level applications to send
the Hibern8 Enter command via the BSG framework. With this feature,
applications can perform H8 stress tests. Also can be used as one
of the triggers for the Eye monitor measurement feature added to the
M-PHY v5 specification.
For completion, allow the sibling functionality of hibern8 exit as well.

Signed-off-by: Arthur Simchaev <arthur.simchaev@sandisk.com>

---
Changed since v1:
 - elaborate commit log
---
 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 be65fc4b5ccd..536b54ccc860 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -4363,6 +4363,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, uic_cmd);
+		goto out;
+	}
+
 	mutex_lock(&hba->uic_cmd_mutex);
 	ufshcd_add_delay_before_dme_cmd(hba);
 
-- 
2.49.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-04-15 17:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-14 12:02 [PATCH v2] ufs: bsg: Add hibern8 enter/exit to ufshcd_send_bsg_uic_cmd Arthur Simchaev
2025-04-14 16:16 ` Bart Van Assche
2025-04-15 17:15   ` Arthur Simchaev
2025-04-15 13:44 ` kernel test robot
2025-04-15 13:54 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®