From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Bart Van Assche <bvanassche@acm.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Avri Altman <avri.altman@wdc.com>, Bean Huo <beanhuo@micron.com>,
Stanley Chu <stanley.chu@mediatek.com>,
Can Guo <cang@codeaurora.org>
Cc: Jaegeuk Kim <jaegeuk@google.com>, Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH] scsi: ufs: support IO traces for zoned block device
Date: Wed, 15 Feb 2023 11:04:48 -0800 [thread overview]
Message-ID: <20230215190448.1687786-1-jaegeuk@kernel.org> (raw)
From: Jaegeuk Kim <jaegeuk@google.com>
Let's support WRITE_16, READ_16, ZBC_IN, ZBC_OUT.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
drivers/ufs/core/ufshcd.c | 8 ++++----
include/trace/events/ufs.h | 4 +++-
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index e18c9f4463ec..235d2e2d828a 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -402,15 +402,15 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag,
opcode = cmd->cmnd[0];
- if (opcode == READ_10 || opcode == WRITE_10) {
- /*
- * Currently we only fully trace read(10) and write(10) commands
- */
+ if (opcode == READ_10 || opcode == WRITE_10 ||
+ opcode == READ_16 || opcode == WRITE_16) {
transfer_len =
be32_to_cpu(lrbp->ucd_req_ptr->sc.exp_data_transfer_len);
lba = scsi_get_lba(cmd);
if (opcode == WRITE_10)
group_id = lrbp->cmd->cmnd[6];
+ if (opcode == WRITE_16)
+ group_id = lrbp->cmd->cmnd[14];
} else if (opcode == UNMAP) {
/*
* The number of Bytes to be unmapped beginning with the lba.
diff --git a/include/trace/events/ufs.h b/include/trace/events/ufs.h
index 599739ee7b20..f82a9e15fd78 100644
--- a/include/trace/events/ufs.h
+++ b/include/trace/events/ufs.h
@@ -18,7 +18,9 @@
{ READ_16, "READ_16" }, \
{ READ_10, "READ_10" }, \
{ SYNCHRONIZE_CACHE, "SYNC" }, \
- { UNMAP, "UNMAP" })
+ { UNMAP, "UNMAP" }, \
+ { ZBC_IN, "ZBC_IN" }, \
+ { ZBC_OUT, "ZBC_OUT" })
#define UFS_LINK_STATES \
EM(UIC_LINK_OFF_STATE, "UIC_LINK_OFF_STATE") \
--
2.39.1.581.gbfd45094c4-goog
next reply other threads:[~2023-02-15 19:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-15 19:04 Jaegeuk Kim [this message]
2023-02-15 19:13 ` [PATCH] scsi: ufs: support IO traces for zoned block device Bart Van Assche
2023-02-16 6:01 ` Christoph Hellwig
2023-02-27 23:15 ` Jaegeuk Kim
2023-02-28 7:28 ` Avri Altman
2023-03-20 12:55 ` hch
2023-03-20 12:55 ` Christoph Hellwig
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=20230215190448.1687786-1-jaegeuk@kernel.org \
--to=jaegeuk@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=jaegeuk@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stanley.chu@mediatek.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