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