diff options
author | mjacob <mjacob@FreeBSD.org> | 1998-12-05 23:55:48 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 1998-12-05 23:55:48 +0000 |
commit | 86adb3351d508cdea5f732e6b90ec7663e1ef1b8 (patch) | |
tree | 88a4bd137ebb50ee3dab63751b12d9db1b8540b9 /sys/cam/cam_debug.h | |
parent | a3957bb74a83dcb5e29104583c2c3b309b9d228f (diff) | |
download | FreeBSD-src-86adb3351d508cdea5f732e6b90ec7663e1ef1b8.zip FreeBSD-src-86adb3351d508cdea5f732e6b90ec7663e1ef1b8.tar.gz |
Add a CAM_DEBUG_XPT define (to debug XPT layer only). Add a CAM_DEBUGGED
macro to be like the CAM_DEBUG macro but to instead provide a predicate
result.
Diffstat (limited to 'sys/cam/cam_debug.h')
-rw-r--r-- | sys/cam/cam_debug.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/cam/cam_debug.h b/sys/cam/cam_debug.h index 198650e..ab07980 100644 --- a/sys/cam/cam_debug.h +++ b/sys/cam/cam_debug.h @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cam_debug.h,v 1.1 1998/09/15 06:33:23 gibbs Exp $ + * $Id: cam_debug.h,v 1.2 1998/10/02 21:00:50 ken Exp $ */ #ifndef _CAM_CAM_DEBUG_H #define _CAM_CAM_DEBUG_H 1 @@ -42,7 +42,8 @@ typedef enum { CAM_DEBUG_INFO = 0x01, /* scsi commands, errors, data */ CAM_DEBUG_TRACE = 0x02, /* routine flow tracking */ CAM_DEBUG_SUBTRACE = 0x04, /* internal to routine flows */ - CAM_DEBUG_CDB = 0x08 /* print out SCSI CDBs only */ + CAM_DEBUG_CDB = 0x08, /* print out SCSI CDBs only */ + CAM_DEBUG_XPT = 0x10 /* print out xpt scheduling */ } cam_debug_flags; #if defined(CAMDEBUG) && defined(KERNEL) @@ -53,6 +54,10 @@ extern struct cam_path *cam_dpath; extern u_int32_t cam_dflags; /* Debugging macros. */ +#define CAM_DEBUGGED(path, flag) \ + ((cam_dflags & (flag)) \ + && (cam_dpath != NULL) \ + && (xpt_path_comp(path, cam_dpath) >= 0)) #define CAM_DEBUG(path, flag, printfargs) \ if ((cam_dflags & (flag)) \ && (cam_dpath != NULL) \ @@ -70,6 +75,7 @@ extern u_int32_t cam_dflags; #else /* !CAMDEBUG || !KERNEL */ +#define CAM_DEBUGGED(A, B) 0 #define CAM_DEBUG(A, B, C) #define CAM_DEBUG_PRINT(A, B) |