From: Bart Van Assche <bvanassche@acm.org>
To: Arthur Simchaev <arthur.simchaev@sandisk.com>
Cc: avri.altman@sandisk.com, Avi.Shchislowski@sandisk.com,
beanhuo@micron.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ufs: bsg: Add hibern8 enter/exit to ufshcd_send_bsg_uic_cmd
Date: Mon, 14 Apr 2025 09:16:12 -0700 [thread overview]
Message-ID: <e038e519-c301-4928-a246-ebd25f16bb32@acm.org> (raw)
In-Reply-To: <20250414120257.247858-1-arthur.simchaev@sandisk.com>
On 4/14/25 5:02 AM, Arthur Simchaev wrote:
> 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);
This is wrong. The BSG interface shouldn't alter the power state without
informing the SCSI core about these power state changes. Please use
existing sysfs attributes to modify the power state or add new sysfs
attributes if necessary.
Bart.
next prev parent reply other threads:[~2025-04-14 16:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 12:02 Arthur Simchaev
2025-04-14 16:16 ` Bart Van Assche [this message]
2025-04-15 17:15 ` Arthur Simchaev
2025-04-15 13:44 ` kernel test robot
2025-04-15 13:54 ` kernel test robot
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=e038e519-c301-4928-a246-ebd25f16bb32@acm.org \
--to=bvanassche@acm.org \
--cc=Avi.Shchislowski@sandisk.com \
--cc=arthur.simchaev@sandisk.com \
--cc=avri.altman@sandisk.com \
--cc=beanhuo@micron.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/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
all inboxes | Powered by JetHome®