From: Guixin Liu <kanie@linux.alibaba.com>
To: kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me
Cc: linux-nvme@lists.infradead.org
Subject: [PATCH v2 3/3] nvme: parse format command's lbafu when tracing
Date: Tue, 30 Jan 2024 19:34:06 +0800 [thread overview]
Message-ID: <20240130113406.8414-5-kanie@linux.alibaba.com> (raw)
In-Reply-To: <20240130113406.8414-1-kanie@linux.alibaba.com>
Add the parse of format command's lbafu to calculate lbaf.
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
drivers/nvme/host/trace.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/trace.c b/drivers/nvme/host/trace.c
index 4b8924abb4e1..7b752ee47f36 100644
--- a/drivers/nvme/host/trace.c
+++ b/drivers/nvme/host/trace.c
@@ -119,7 +119,10 @@ static const char *nvme_trace_get_lba_status(struct trace_seq *p,
static const char *nvme_trace_admin_format_nvm(struct trace_seq *p, u8 *cdw10)
{
const char *ret = trace_seq_buffer_ptr(p);
- u8 lbaf = cdw10[0] & 0xF;
+ /*
+ * lbafu(bit 13:12) is already in the upper 4 bits, lbafl: bit 03:00.
+ */
+ u8 lbaf = (cdw10[1] & 0x30) | (cdw10[0] & 0xF);
u8 mset = (cdw10[0] >> 4) & 0x1;
u8 pi = (cdw10[0] >> 5) & 0x7;
u8 pil = cdw10[1] & 0x1;
--
2.43.0
next prev parent reply other threads:[~2024-01-30 11:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 11:34 [PATCH v2 0/3] *** nvme: add some commands tracing *** Guixin Liu
2024-01-30 11:34 ` [PATCH v2 1/3] nvme: add tracing of reservation commands Guixin Liu
2024-01-30 11:34 ` [PATCH 2/3] nvme: parse dsm command detailly when tracing Guixin Liu
2024-01-30 11:35 ` Guixin Liu
2024-01-30 11:34 ` [PATCH v2 2/3] nvme: parse dsm command's attr deallocate " Guixin Liu
2024-01-30 11:34 ` Guixin Liu [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-01-31 9:12 [PATCH v2 0/3] *** nvme: add some commands tracing *** Guixin Liu
2024-01-31 9:12 ` [PATCH v2 3/3] nvme: parse format command's lbafu when tracing Guixin Liu
2024-01-31 17:32 ` 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=20240130113406.8414-5-kanie@linux.alibaba.com \
--to=kanie@linux.alibaba.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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