diff options
author | Guixin Liu | 2024-01-31 17:12:22 +0800 |
---|---|---|
committer | Keith Busch | 2024-03-14 11:38:28 -0700 |
commit | 798edad968ace3c15c3180ba72e427630022e2d9 (patch) | |
tree | 2817b35342ce2f522f9927580de83fc0f133905f /drivers/nvme | |
parent | 6a0164f9f4a0b629fd7a5414d6c7d21999141b5e (diff) |
nvme: parse format command's lbafu when tracing
Add the parse of format command's lbafu to calculate lbaf.
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/trace.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/nvme/host/trace.c b/drivers/nvme/host/trace.c index 7e6719a3b624..0288315f0050 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; |