Skip to content

Commit 798edad

Browse files
guixinliu1995keithbusch
authored andcommitted
nvme: parse format command's lbafu when tracing
Add the parse of format command's lbafu to calculate lbaf. Signed-off-by: Guixin Liu <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent 6a0164f commit 798edad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/nvme/host/trace.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,10 @@ static const char *nvme_trace_get_lba_status(struct trace_seq *p,
119119
static const char *nvme_trace_admin_format_nvm(struct trace_seq *p, u8 *cdw10)
120120
{
121121
const char *ret = trace_seq_buffer_ptr(p);
122-
u8 lbaf = cdw10[0] & 0xF;
122+
/*
123+
* lbafu(bit 13:12) is already in the upper 4 bits, lbafl: bit 03:00.
124+
*/
125+
u8 lbaf = (cdw10[1] & 0x30) | (cdw10[0] & 0xF);
123126
u8 mset = (cdw10[0] >> 4) & 0x1;
124127
u8 pi = (cdw10[0] >> 5) & 0x7;
125128
u8 pil = cdw10[1] & 0x1;

0 commit comments

Comments
 (0)