Commit | Line | Data |
---|---|---|
519fb2b7 RG |
1 | /*#define SCSIDEBUG 1*/ |
2 | /* | |
3 | * Written by Julian Elischer (julian@tfs.com) | |
4 | * | |
5 | * $Id: scsi_debug.h,v 1.3 93/10/10 09:26:05 julian Exp Locker: julian $ | |
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 | printf("%s%d(%s%d:%d:%d): ", \ | |
33 | sc_link->device->name, \ | |
34 | sc_link->dev_unit, \ | |
35 | sc_link->adapter->name, \ | |
36 | sc_link->adapter_unit, \ | |
37 | sc_link->target, \ | |
38 | sc_link->lun); \ | |
39 | printf Printstuff; \ | |
40 | } | |
41 | #define SC_DEBUGN(sc_link,Level,Printstuff) \ | |
42 | if((sc_link)->flags & (Level)) \ | |
43 | { \ | |
44 | printf Printstuff; \ | |
45 | } | |
46 | #else | |
47 | #define SC_DEBUG(A,B,C) /* not included */ | |
48 | #define SC_DEBUGN(A,B,C) /* not included */ | |
49 | #endif | |
50 | ||
51 | #endif /*_SCSI_SCSI_DEBUG_H*/ | |
52 | /* END OF FILE */ | |
53 |