* [PATCH] scsi: trace: print the CDL duration limit descriptor index
@ 2026-11-24 12:41 Johannes Thumshirn
2026-11-25 4:56 ` Christoph Hellwig
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2026-11-24 12:41 UTC (permalink / raw)
To: Martin K . Petersen
Cc: linux-scsi, Niklas Cassel, Hannes Reinecke, Damien Le Moal,
Christoph Hellwig, Johannes Thumshirn
Print the duration limit descriptor index (DLD) of READ(16), WRITE(16),
READ(32) and WRITE(32) commands in the SCSI command tracing, so it can be
seen which command duration limit a command was issued with.
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
drivers/scsi/scsi_trace.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/scsi/scsi_trace.c b/drivers/scsi/scsi_trace.c
index b3baae91e7a2..bd3ed38e14f3 100644
--- a/drivers/scsi/scsi_trace.c
+++ b/drivers/scsi/scsi_trace.c
@@ -82,6 +82,10 @@ scsi_trace_rw16(struct trace_seq *p, unsigned char *cdb, int len)
trace_seq_printf(p, "lba=%llu txlen=%u protect=%u", lba, txlen,
cdb[1] >> 5);
+ if (cdb[0] == READ_16 || cdb[0] == WRITE_16)
+ trace_seq_printf(p, " dld=%u",
+ ((cdb[1] & 0x01) << 2) | (cdb[14] >> 6));
+
if (cdb[0] == WRITE_SAME_16)
trace_seq_printf(p, " unmap=%u", cdb[1] >> 3 & 1);
@@ -122,6 +126,10 @@ scsi_trace_rw32(struct trace_seq *p, unsigned char *cdb, int len)
trace_seq_printf(p, "%s_32 lba=%llu txlen=%u protect=%u ei_lbrt=%u",
cmd, lba, txlen, cdb[10] >> 5, ei_lbrt);
+ if (SERVICE_ACTION32(cdb) == READ_32 ||
+ SERVICE_ACTION32(cdb) == WRITE_32)
+ trace_seq_printf(p, " dld=%u", cdb[11] & 0x07);
+
if (SERVICE_ACTION32(cdb) == WRITE_SAME_32)
trace_seq_printf(p, " unmap=%u", cdb[10] >> 3 & 1);
--
2.56.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: trace: print the CDL duration limit descriptor index
2026-11-24 12:41 [PATCH] scsi: trace: print the CDL duration limit descriptor index Johannes Thumshirn
@ 2026-11-25 4:56 ` Christoph Hellwig
2026-11-25 22:15 ` Damien Le Moal
2026-11-26 3:11 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2026-11-25 4:56 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Martin K . Petersen, linux-scsi, Niklas Cassel, Hannes Reinecke,
Damien Le Moal, Christoph Hellwig
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: trace: print the CDL duration limit descriptor index
2026-11-24 12:41 [PATCH] scsi: trace: print the CDL duration limit descriptor index Johannes Thumshirn
2026-11-25 4:56 ` Christoph Hellwig
@ 2026-11-25 22:15 ` Damien Le Moal
2026-11-26 3:11 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Damien Le Moal @ 2026-11-25 22:15 UTC (permalink / raw)
To: Johannes Thumshirn, Martin K . Petersen
Cc: linux-scsi, Niklas Cassel, Hannes Reinecke, Christoph Hellwig
On 11/24/26 21:41, Johannes Thumshirn wrote:
> Print the duration limit descriptor index (DLD) of READ(16), WRITE(16),
> READ(32) and WRITE(32) commands in the SCSI command tracing, so it can be
> seen which command duration limit a command was issued with.
>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: trace: print the CDL duration limit descriptor index
2026-11-24 12:41 [PATCH] scsi: trace: print the CDL duration limit descriptor index Johannes Thumshirn
2026-11-25 4:56 ` Christoph Hellwig
2026-11-25 22:15 ` Damien Le Moal
@ 2026-11-26 3:11 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2026-11-26 3:11 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Martin K . Petersen, linux-scsi, Niklas Cassel, Hannes Reinecke,
Damien Le Moal, Christoph Hellwig
Johannes,
> Print the duration limit descriptor index (DLD) of READ(16),
> WRITE(16), READ(32) and WRITE(32) commands in the SCSI command
> tracing, so it can be seen which command duration limit a command was
> issued with.
Applied to 7.5/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-26 3:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 12:41 [PATCH] scsi: trace: print the CDL duration limit descriptor index Johannes Thumshirn
2026-11-25 4:56 ` Christoph Hellwig
2026-11-25 22:15 ` Damien Le Moal
2026-11-26 3:11 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox