-/* SPDX-License-Identifier: GPL-2.0-only */
+// SPDX-FileCopyrightText: 2012 Paul Woegerer <paul_woegerer@mentor.com>
+//
+// SPDX-License-Identifier: GPL-2.0-only
+
#undef TRACE_SYSTEM
#define TRACE_SYSTEM scsi
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_host.h>
#include <linux/trace_seq.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
#ifndef _TRACE_SCSI_DEF
#define _TRACE_SCSI_DEF
#define scsi_opcode_name(opcode) { opcode, #opcode }
-#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))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,11,0))
#define show_opcode_name(val) \
__print_symbolic(val, \
scsi_opcode_name(WRITE_32), \
scsi_opcode_name(WRITE_SAME_32), \
scsi_opcode_name(ATA_16), \
+ scsi_opcode_name(WRITE_ATOMIC_16), \
scsi_opcode_name(ATA_12))
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) \
- || LTTNG_RHEL_KERNEL_RANGE(3,10,0,327,0,0, 3,11,0,0,0,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_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, \
scsi_opcode_name(WRITE_16), \
scsi_opcode_name(VERIFY_16), \
scsi_opcode_name(WRITE_SAME_16), \
+ scsi_opcode_name(ZBC_OUT), \
+ scsi_opcode_name(ZBC_IN), \
scsi_opcode_name(SERVICE_ACTION_IN_16), \
- scsi_opcode_name(SAI_READ_CAPACITY_16), \
- scsi_opcode_name(SAI_GET_LBA_STATUS), \
- scsi_opcode_name(MI_REPORT_TARGET_PGS), \
- scsi_opcode_name(MO_SET_TARGET_PGS), \
scsi_opcode_name(READ_32), \
scsi_opcode_name(WRITE_32), \
scsi_opcode_name(WRITE_SAME_32), \
scsi_opcode_name(ATA_16), \
scsi_opcode_name(ATA_12))
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)) */
+#else
#define show_opcode_name(val) \
__print_symbolic(val, \
scsi_opcode_name(WRITE_16), \
scsi_opcode_name(VERIFY_16), \
scsi_opcode_name(WRITE_SAME_16), \
- scsi_opcode_name(SERVICE_ACTION_IN), \
+ scsi_opcode_name(SERVICE_ACTION_IN_16), \
scsi_opcode_name(SAI_READ_CAPACITY_16), \
scsi_opcode_name(SAI_GET_LBA_STATUS), \
scsi_opcode_name(MI_REPORT_TARGET_PGS), \
scsi_opcode_name(ATA_16), \
scsi_opcode_name(ATA_12))
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,7,0)) */
#define scsi_hostbyte_name(result) { result, #result }
#define show_hostbyte_name(val) \