X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fscsi.h;h=7882def286f9a234fc93b8ef4293fd600c972d06;hb=66d91dec14b558f3228b1d8d0d4641b948ac64dc;hp=02e335333e61625631a300d75a6ff90b75744419;hpb=3e86016420272ce5ef0139ad52f20c83305f0f15;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/scsi.h b/instrumentation/events/lttng-module/scsi.h index 02e33533..7882def2 100644 --- a/instrumentation/events/lttng-module/scsi.h +++ b/instrumentation/events/lttng-module/scsi.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #undef TRACE_SYSTEM #define TRACE_SYSTEM scsi @@ -15,7 +16,8 @@ #define scsi_opcode_name(opcode) { opcode, #opcode } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) \ + || LTTNG_SLE_KERNEL_RANGE(4,4,9,36,0,0, 4,5,0,0,0,0)) #define show_opcode_name(val) \ __print_symbolic(val, \ @@ -386,7 +388,6 @@ scsi_statusbyte_name(SAM_STAT_ACA_ACTIVE), \ scsi_statusbyte_name(SAM_STAT_TASK_ABORTED)) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) #define scsi_prot_op_name(result) { result, #result } #define show_prot_op_name(val) \ __print_symbolic(val, \ @@ -397,7 +398,6 @@ scsi_prot_op_name(SCSI_PROT_WRITE_INSERT), \ scsi_prot_op_name(SCSI_PROT_READ_PASS), \ scsi_prot_op_name(SCSI_PROT_WRITE_PASS)) -#endif const char *scsi_trace_parse_cdb(struct trace_seq*, unsigned char*, int); #define __parse_cdb(cdb, len) scsi_trace_parse_cdb(p, cdb, len) @@ -418,9 +418,7 @@ LTTNG_TRACEPOINT_EVENT(scsi_dispatch_cmd_start, ctf_integer(unsigned int, cmd_len, cmd->cmd_len) ctf_integer(unsigned int, data_sglen, scsi_sg_count(cmd)) ctf_integer(unsigned int, prot_sglen, scsi_prot_sg_count(cmd)) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) ctf_integer(unsigned char, prot_op, scsi_get_prot_op(cmd)) -#endif ctf_sequence_hex(unsigned char, cmnd, cmd->cmnd, u32, cmd->cmd_len) ) ) @@ -441,9 +439,7 @@ LTTNG_TRACEPOINT_EVENT(scsi_dispatch_cmd_error, ctf_integer(unsigned int, cmd_len, cmd->cmd_len) ctf_integer(unsigned int, data_sglen, scsi_sg_count(cmd)) ctf_integer(unsigned int, prot_sglen, scsi_prot_sg_count(cmd)) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) ctf_integer(unsigned char, prot_op, scsi_get_prot_op(cmd)) -#endif ctf_sequence_hex(unsigned char, cmnd, cmd->cmnd, u32, cmd->cmd_len) ) ) @@ -464,9 +460,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(scsi_cmd_done_timeout_template, ctf_integer(unsigned int, cmd_len, cmd->cmd_len) ctf_integer(unsigned int, data_sglen, scsi_sg_count(cmd)) ctf_integer(unsigned int, prot_sglen, scsi_prot_sg_count(cmd)) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) ctf_integer(unsigned char, prot_op, scsi_get_prot_op(cmd)) -#endif ctf_sequence_hex(unsigned char, cmnd, cmd->cmnd, u32, cmd->cmd_len) ) )