Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: "Peter Wang (王信友)" <peter.wang@mediatek.com>
To: "bvanassche@acm.org" <bvanassche@acm.org>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"beanhuo@micron.com" <beanhuo@micron.com>,
	"can.guo@oss.qualcomm.com" <can.guo@oss.qualcomm.com>,
	"avri.altman@sandisk.com" <avri.altman@sandisk.com>,
	"James.Bottomley@HansenPartnership.com"
	<James.Bottomley@HansenPartnership.com>,
	"adrian.hunter@intel.com" <adrian.hunter@intel.com>
Subject: Re: [PATCH 3/3] ufs: core: Optimize ufshcd_add_uic_command_trace()
Date: Tue, 21 Apr 2026 08:45:00 +0000	[thread overview]
Message-ID: <a186b02b00694be3e89cd49d477c050df4bb1cf5.camel@mediatek.com> (raw)
In-Reply-To: <20260417213027.3506742-4-bvanassche@acm.org>

On Fri, 2026-04-17 at 14:30 -0700, Bart Van Assche wrote:
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 0ff9d7c2a7ac..12445e012cad 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -460,20 +460,11 @@ static void ufshcd_add_uic_command_trace(struct
> ufs_hba *hba,
>                                          const struct uic_command
> *ucmd,
>                                          enum ufs_trace_str_t str_t)
>  {
> -       u32 cmd;
> -
>         if (!trace_ufshcd_uic_command_enabled())
>                 return;
> 
> -       if (str_t == UFS_CMD_SEND)
> -               cmd = ucmd->command;
> -       else
> -               cmd = ufshcd_readl(hba, REG_UIC_COMMAND);
> -
> -       trace_ufshcd_uic_command(hba, str_t, cmd,
> -                                ufshcd_readl(hba,
> REG_UIC_COMMAND_ARG_1),
> -                                ufshcd_readl(hba,
> REG_UIC_COMMAND_ARG_2),
> -                                ufshcd_readl(hba,
> REG_UIC_COMMAND_ARG_3));
> +       trace_ufshcd_uic_command(hba, str_t, ucmd->command, ucmd-
> >argument1,
> +                                ucmd->argument2, ucmd->argument3);
>  }

Hi Bart,

In the complete case, all these commands and arguments 1 to 3 
are filled by hardware. If we do not read them from the hardware, 
how can we be sure of the actual values written by the hardware?

Thanks
Peter

  reply	other threads:[~2026-04-21  8:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-17 21:30 [PATCH 0/3] ufs: core: Optimize the UIC command implementation Bart Van Assche
2026-04-17 21:30 ` [PATCH 1/3] ufs: core: Inline two functions related to UIC commands Bart Van Assche
2026-04-21  8:41   ` Peter Wang (王信友)
2026-04-17 21:30 ` [PATCH 2/3] ufs: core: Complain if UIC argument 2 is invalid Bart Van Assche
2026-04-21  8:42   ` Peter Wang (王信友)
2026-04-17 21:30 ` [PATCH 3/3] ufs: core: Optimize ufshcd_add_uic_command_trace() Bart Van Assche
2026-04-21  8:45   ` Peter Wang (王信友) [this message]
2026-04-21 19:37     ` Bart Van Assche
2026-04-22  7:52       ` Peter Wang (王信友)
2026-04-22 16:30         ` Bart Van Assche
2026-04-23  8:08           ` Peter Wang (王信友)

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=a186b02b00694be3e89cd49d477c050df4bb1cf5.camel@mediatek.com \
    --to=peter.wang@mediatek.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=adrian.hunter@intel.com \
    --cc=avri.altman@sandisk.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=can.guo@oss.qualcomm.com \
    --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