[PATCH 3/3] nvme: parse format command's lbafu when tracing
Guixin Liu
kanie at linux.alibaba.com
Mon Jan 29 00:22:56 PST 2024
Add the parse of format command's lbafu to calculate lbaf.
Signed-off-by: Guixin Liu <kanie at linux.alibaba.com>
---
drivers/nvme/host/trace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/trace.c b/drivers/nvme/host/trace.c
index b383d51c1a0c..3ccb33646794 100644
--- a/drivers/nvme/host/trace.c
+++ b/drivers/nvme/host/trace.c
@@ -119,7 +119,9 @@ 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;
+ u8 lbafl = cdw10[0] & 0xF;
+ u8 lbafu = (cdw10[1] >> 4) & 0x3;
+ u8 lbaf = (lbafu << 4) | lbafl;
u8 mset = (cdw10[0] >> 4) & 0x1;
u8 pi = (cdw10[0] >> 5) & 0x7;
u8 pil = cdw10[1] & 0x1;
--
2.43.0
More information about the Linux-nvme
mailing list