mirror-linux/include/trace
Kassey Li 9d2c232d57 scsi: trace: Show rtn in string for scsi_dispatch_cmd_error()
By default the scsi_dispatch_cmd_error() return value is displayed in
decimal:

  kworker/3:1H-183 [003] ....  51.035474: scsi_dispatch_cmd_error: host_no=0 channel=0 id=0 lun=4 data_sgl=1  prot_sgl=0 prot_op=SCSI_PROT_NORMAL cmnd=(READ_10 lba=3907214  txlen=1 protect=0 raw=28 00 00 3b 9e 8e 00 00 01 00) rtn=4181

However, these numbers are not particularly helpful wrt. debugging
errors. Especially since the kernel code consistently uses the following
defines in hexadecimal:

  SCSI_MLQUEUE_HOST_BUSY   0x1055
  SCSI_MLQUEUE_DEVICE_BUSY 0x1056
  SCSI_MLQUEUE_EH_RETRY    0x1057
  SCSI_MLQUEUE_TARGET_BUSY 0x1058

Switch to using the string form of these values in the trace output:

  dd-1059    [007] .....    31.689529: scsi_dispatch_cmd_error: host_no=0 channel=0 id=0 lun=4 data_sgl=65 prot_sgl=0 prot_op=SCSI_PROT_NORMAL driver_tag=23 scheduler_tag=117 cmnd=(READ_10 lba=0 txlen=128 protect=0 raw=28 00 00 00 00 00 00 00 80 00) rtn=SCSI_MLQUEUE_DEVICE_BUSY

Signed-off-by: Kassey Li <quic_yingangl@quicinc.com>
Link: https://lore.kernel.org/r/20250521011711.1983625-1-quic_yingangl@quicinc.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-06-09 21:59:07 -04:00
..
events scsi: trace: Show rtn in string for scsi_dispatch_cmd_error() 2025-06-09 21:59:07 -04:00
misc nfsd: add a tracepoint for nfsd_setattr 2025-05-11 19:48:30 -04:00
stages tracing: Add __print_dynamic_array() helper 2024-10-30 17:24:32 +01:00
bpf_probe.h tracepoint: Have tracepoints created with DECLARE_TRACE() have _tp suffix 2025-05-14 11:19:32 -04:00
define_custom_trace.h
define_trace.h tracepoint: Have tracepoints created with DECLARE_TRACE() have _tp suffix 2025-05-14 11:19:32 -04:00
perf.h tracing/perf: Add might_fault check to syscall probes 2024-10-09 17:09:46 -04:00
syscall.h
trace_custom_events.h
trace_events.h tracing/ftrace: Add might_fault check to syscall probes 2024-10-09 17:09:36 -04:00