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