[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230223222745epcms2p2a85ca78bc48f366869fa224afa18799d@epcms2p2>
Date: Fri, 24 Feb 2023 07:27:45 +0900
From: Daejun Park <daejun7.park@...sung.com>
To: Ziqi Chen <quic_ziqichen@...cinc.com>,
"quic_asutoshd@...cinc.com" <quic_asutoshd@...cinc.com>,
"quic_cang@...cinc.com" <quic_cang@...cinc.com>,
"bvanassche@....org" <bvanassche@....org>,
"mani@...nel.org" <mani@...nel.org>,
"stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
"adrian.hunter@...el.com" <adrian.hunter@...el.com>,
"beanhuo@...ron.com" <beanhuo@...ron.com>,
"avri.altman@....com" <avri.altman@....com>,
JunWoo Lee <junwoo80.lee@...sung.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
ALIM AKHTAR <alim.akhtar@...sung.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
Steven Rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
open list <linux-kernel@...r.kernel.org>,
Daejun Park <daejun7.park@...sung.com>
Subject: RE: [PATCH v3] scsi: ufs: core: Add trace event for MCQ
Hi Ziqi Chen,
...
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 3b3cf78..67cb90d 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -426,6 +426,7 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag,
> struct ufshcd_lrb *lrbp = &hba->lrb[tag];
> struct scsi_cmnd *cmd = lrbp->cmd;
> struct request *rq = scsi_cmd_to_rq(cmd);
> + struct ufs_hw_queue *hwq;
> int transfer_len = -1;
>
> if (!cmd)
> @@ -456,9 +457,16 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag,
> }
>
> intr = ufshcd_readl(hba, REG_INTERRUPT_STATUS);
> - doorbell = ufshcd_readl(hba, REG_UTP_TRANSFER_REQ_DOOR_BELL);
> - trace_ufshcd_command(dev_name(hba->dev), str_t, tag,
> - doorbell, transfer_len, intr, lba, opcode, group_id);
> +
> + if (is_mcq_enabled(hba)) {
> + hwq = ufshcd_mcq_req_to_hwq(hba, rq);
> + trace_ufshcd_command_mcq(dev_name(hba->dev), str_t, tag,
> + hwq, transfer_len, intr, lba, opcode, group_id);
How about passing member variables of hwq instead of passing hwq?
> + } else {
> + doorbell = ufshcd_readl(hba, REG_UTP_TRANSFER_REQ_DOOR_BELL);
> + trace_ufshcd_command(dev_name(hba->dev), str_t, tag,
> + doorbell, transfer_len, intr, lba, opcode, group_id);
> + }
> }
>
> static void ufshcd_print_clk_freqs(struct ufs_hba *hba)
> diff --git a/include/trace/events/ufs.h b/include/trace/events/ufs.h
> index 599739e..604b2cd 100644
> --- a/include/trace/events/ufs.h
> +++ b/include/trace/events/ufs.h
> @@ -10,6 +10,7 @@
> #define _TRACE_UFS_H
>
> #include <linux/tracepoint.h>
> +#include <ufs/ufshcd.h>
Then, it can be removed.
Thanks,
Daejun
Powered by blists - more mailing lists