Go to the documentation of this file. 1 #ifndef _SCSI_LOGGING_H
2 #define _SCSI_LOGGING_H
17 #define SCSI_LOG_ERROR_SHIFT 0
18 #define SCSI_LOG_TIMEOUT_SHIFT 3
19 #define SCSI_LOG_SCAN_SHIFT 6
20 #define SCSI_LOG_MLQUEUE_SHIFT 9
21 #define SCSI_LOG_MLCOMPLETE_SHIFT 12
22 #define SCSI_LOG_LLQUEUE_SHIFT 15
23 #define SCSI_LOG_LLCOMPLETE_SHIFT 18
24 #define SCSI_LOG_HLQUEUE_SHIFT 21
25 #define SCSI_LOG_HLCOMPLETE_SHIFT 24
26 #define SCSI_LOG_IOCTL_SHIFT 27
28 #define SCSI_LOG_ERROR_BITS 3
29 #define SCSI_LOG_TIMEOUT_BITS 3
30 #define SCSI_LOG_SCAN_BITS 3
31 #define SCSI_LOG_MLQUEUE_BITS 3
32 #define SCSI_LOG_MLCOMPLETE_BITS 3
33 #define SCSI_LOG_LLQUEUE_BITS 3
34 #define SCSI_LOG_LLCOMPLETE_BITS 3
35 #define SCSI_LOG_HLQUEUE_BITS 3
36 #define SCSI_LOG_HLCOMPLETE_BITS 3
37 #define SCSI_LOG_IOCTL_BITS 3
41 #ifdef CONFIG_SCSI_LOGGING
43 #define SCSI_LOG_LEVEL(SHIFT, BITS) \
44 ((scsi_logging_level >> (SHIFT)) & ((1 << (BITS)) - 1))
46 #define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD) \
48 if (unlikely((SCSI_LOG_LEVEL(SHIFT, BITS)) > (LEVEL))) \
54 #define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD)
62 #define SCSI_LOG_ERROR_RECOVERY(LEVEL,CMD) \
63 SCSI_CHECK_LOGGING(SCSI_LOG_ERROR_SHIFT, SCSI_LOG_ERROR_BITS, LEVEL,CMD);
64 #define SCSI_LOG_TIMEOUT(LEVEL,CMD) \
65 SCSI_CHECK_LOGGING(SCSI_LOG_TIMEOUT_SHIFT, SCSI_LOG_TIMEOUT_BITS, LEVEL,CMD);
66 #define SCSI_LOG_SCAN_BUS(LEVEL,CMD) \
67 SCSI_CHECK_LOGGING(SCSI_LOG_SCAN_SHIFT, SCSI_LOG_SCAN_BITS, LEVEL,CMD);
68 #define SCSI_LOG_MLQUEUE(LEVEL,CMD) \
69 SCSI_CHECK_LOGGING(SCSI_LOG_MLQUEUE_SHIFT, SCSI_LOG_MLQUEUE_BITS, LEVEL,CMD);
70 #define SCSI_LOG_MLCOMPLETE(LEVEL,CMD) \
71 SCSI_CHECK_LOGGING(SCSI_LOG_MLCOMPLETE_SHIFT, SCSI_LOG_MLCOMPLETE_BITS, LEVEL,CMD);
72 #define SCSI_LOG_LLQUEUE(LEVEL,CMD) \
73 SCSI_CHECK_LOGGING(SCSI_LOG_LLQUEUE_SHIFT, SCSI_LOG_LLQUEUE_BITS, LEVEL,CMD);
74 #define SCSI_LOG_LLCOMPLETE(LEVEL,CMD) \
75 SCSI_CHECK_LOGGING(SCSI_LOG_LLCOMPLETE_SHIFT, SCSI_LOG_LLCOMPLETE_BITS, LEVEL,CMD);
76 #define SCSI_LOG_HLQUEUE(LEVEL,CMD) \
77 SCSI_CHECK_LOGGING(SCSI_LOG_HLQUEUE_SHIFT, SCSI_LOG_HLQUEUE_BITS, LEVEL,CMD);
78 #define SCSI_LOG_HLCOMPLETE(LEVEL,CMD) \
79 SCSI_CHECK_LOGGING(SCSI_LOG_HLCOMPLETE_SHIFT, SCSI_LOG_HLCOMPLETE_BITS, LEVEL,CMD);
80 #define SCSI_LOG_IOCTL(LEVEL,CMD) \
81 SCSI_CHECK_LOGGING(SCSI_LOG_IOCTL_SHIFT, SCSI_LOG_IOCTL_BITS, LEVEL,CMD);