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