FreeBSD/Linux Kernel Cross Reference
sys/scsi/scsi_debug.h
1 /*
2 * Use
3 * options SCSIDEBUG
4 *
5 * in the kernel config file to get these macros into effect.
6 */
7
8 /*
9 * Written by Julian Elischer (julian@tfs.com)
10 *
11 * $FreeBSD: src/sys/scsi/scsi_debug.h,v 1.3.4.1 1999/09/05 08:21:41 peter Exp $
12 */
13 #ifndef _SCSI_SCSI_DEBUG_H
14 #define _SCSI_SCSI_DEBUG_H 1
15
16 /*
17 * These are the new debug bits. (Sat Oct 2 12:46:46 WST 1993)
18 * the following DEBUG bits are defined to exist in the flags word of
19 * the scsi_link structure.
20 */
21 #define SDEV_DB1 0x10 /* scsi commands, errors, data */
22 #define SDEV_DB2 0x20 /* routine flow tracking */
23 #define SDEV_DB3 0x40 /* internal to routine flows */
24 #define SDEV_DB4 0x80 /* level 4 debugging for this dev */
25
26 /* target and LUN we want to debug */
27 #define DEBUGTARG 9 /*9 = dissable*/
28 #define DEBUGLUN 0
29 #define DEBUGLEVEL (SDEV_DB1|SDEV_DB2)
30
31 /*
32 * This is the usual debug macro for use with the above bits
33 */
34 #ifdef SCSIDEBUG
35 #define SC_DEBUG(sc_link,Level,Printstuff) \
36 if((sc_link)->flags & (Level)) \
37 { \
38 printf("%s%d(%s%d:%d:%d): ", \
39 sc_link->device->name, \
40 sc_link->dev_unit, \
41 sc_link->adapter->name, \
42 sc_link->adapter_unit, \
43 sc_link->target, \
44 sc_link->lun); \
45 printf Printstuff; \
46 }
47 #define SC_DEBUGN(sc_link,Level,Printstuff) \
48 if((sc_link)->flags & (Level)) \
49 { \
50 printf Printstuff; \
51 }
52 #else
53 #define SC_DEBUG(A,B,C) /* not included */
54 #define SC_DEBUGN(A,B,C) /* not included */
55 #endif
56
57 #endif /*_SCSI_SCSI_DEBUG_H*/
58 /* END OF FILE */
59
Cache object: 40f99f5281d0c005940ee349ded957a0
|