scsipi_debug.h revision 1.4 1 /* $NetBSD: scsipi_debug.h,v 1.4 1994/11/21 10:39:19 mycroft Exp $ */
2
3 /*#define SCSIDEBUG 1*/
4 /*
5 * Written by Julian Elischer (julian (at) tfs.com)
6 */
7 #ifndef _SCSI_SCSI_DEBUG_H
8 #define _SCSI_SCSI_DEBUG_H 1
9
10 /*
11 * These are the new debug bits. (Sat Oct 2 12:46:46 WST 1993)
12 * the following DEBUG bits are defined to exist in the flags word of
13 * the scsi_link structure.
14 */
15 #define SDEV_DB1 0x10 /* scsi commands, errors, data */
16 #define SDEV_DB2 0x20 /* routine flow tracking */
17 #define SDEV_DB3 0x40 /* internal to routine flows */
18 #define SDEV_DB4 0x80 /* level 4 debugging for this dev */
19
20 /* target and LUN we want to debug */
21 #define DEBUGTARG 9 /*9 = dissable*/
22 #define DEBUGLUN 0
23 #define DEBUGLEVEL (SDEV_DB1|SDEV_DB2)
24
25 /*
26 * This is the usual debug macro for use with the above bits
27 */
28 #ifdef SCSIDEBUG
29 #define SC_DEBUG(sc_link,Level,Printstuff) \
30 if((sc_link)->flags & (Level)) \
31 { \
32 sc_print_addr(sc_link); \
33 printf Printstuff; \
34 }
35 #define SC_DEBUGN(sc_link,Level,Printstuff) \
36 if((sc_link)->flags & (Level)) \
37 { \
38 printf Printstuff; \
39 }
40 #else
41 #define SC_DEBUG(A,B,C) /* not included */
42 #define SC_DEBUGN(A,B,C) /* not included */
43 #endif
44
45 #endif /*_SCSI_SCSI_DEBUG_H*/
46 /* END OF FILE */
47
48