FreeBSD kernel CAM code
cam_debug.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CAM_DEBUG_FLAGS   CAM_DEBUG_NONE
 
#define CAM_DEBUG_COMPILE
 
#define CAM_DEBUG_BUS   CAM_BUS_WILDCARD
 
#define CAM_DEBUG_TARGET   CAM_TARGET_WILDCARD
 
#define CAM_DEBUG_LUN   CAM_LUN_WILDCARD
 
#define CAM_DEBUG_DELAY   0
 
#define CAM_DEBUGGED(path, flag)
 
#define CAM_DEBUG(path, flag, printfargs)
 
#define CAM_DEBUG_DEV(dev, flag, printfargs)
 
#define CAM_DEBUG_PRINT(flag, printfargs)
 
#define CAM_DEBUG_PATH_PRINT(flag, path, printfargs)
 

Enumerations

enum  cam_debug_flags {
  CAM_DEBUG_NONE = 0x00 , CAM_DEBUG_INFO = 0x01 , CAM_DEBUG_TRACE = 0x02 , CAM_DEBUG_SUBTRACE = 0x04 ,
  CAM_DEBUG_CDB = 0x08 , CAM_DEBUG_XPT = 0x10 , CAM_DEBUG_PERIPH = 0x20 , CAM_DEBUG_PROBE = 0x40
}
 

Variables

struct cam_pathcam_dpath
 
u_int32_t cam_dflags
 
u_int32_t cam_debug_delay
 

Macro Definition Documentation

◆ CAM_DEBUG

#define CAM_DEBUG (   path,
  flag,
  printfargs 
)
Value:
if (((flag) & (CAM_DEBUG_COMPILE) & cam_dflags) \
&& (cam_dpath != NULL) \
&& (xpt_path_comp(cam_dpath, path) >= 0) \
&& (xpt_path_comp(cam_dpath, path) < 2)) { \
xpt_print_path(path); \
printf printfargs; \
if (cam_debug_delay != 0) \
DELAY(cam_debug_delay); \
}
u_int32_t cam_dflags
Definition: cam_xpt.c:217
#define CAM_DEBUG_COMPILE
Definition: cam_debug.h:59
u_int32_t cam_debug_delay
Definition: cam_xpt.c:220
struct cam_path * cam_dpath
Definition: cam_xpt.c:216
int xpt_path_comp(struct cam_path *path1, struct cam_path *path2)
Definition: cam_xpt.c:3718

Definition at line 93 of file cam_debug.h.

◆ CAM_DEBUG_BUS

#define CAM_DEBUG_BUS   CAM_BUS_WILDCARD

Definition at line 66 of file cam_debug.h.

◆ CAM_DEBUG_COMPILE

#define CAM_DEBUG_COMPILE
Value:
CAM_DEBUG_PERIPH | CAM_DEBUG_PROBE | \
CAM_DEBUG_FLAGS)
@ CAM_DEBUG_PROBE
Definition: cam_debug.h:46
@ CAM_DEBUG_CDB
Definition: cam_debug.h:43
@ CAM_DEBUG_INFO
Definition: cam_debug.h:40

Definition at line 59 of file cam_debug.h.

◆ CAM_DEBUG_DELAY

#define CAM_DEBUG_DELAY   0

Definition at line 76 of file cam_debug.h.

◆ CAM_DEBUG_DEV

#define CAM_DEBUG_DEV (   dev,
  flag,
  printfargs 
)
Value:
if (((flag) & (CAM_DEBUG_COMPILE) & cam_dflags) \
&& (cam_dpath != NULL) \
&& (xpt_path_comp_dev(cam_dpath, dev) >= 0) \
&& (xpt_path_comp_dev(cam_dpath, dev) < 2)) { \
xpt_print_device(dev); \
printf printfargs; \
if (cam_debug_delay != 0) \
DELAY(cam_debug_delay); \
}
int xpt_path_comp_dev(struct cam_path *path, struct cam_ed *dev)
Definition: cam_xpt.c:3752

Definition at line 104 of file cam_debug.h.

◆ CAM_DEBUG_FLAGS

#define CAM_DEBUG_FLAGS   CAM_DEBUG_NONE

Definition at line 52 of file cam_debug.h.

◆ CAM_DEBUG_LUN

#define CAM_DEBUG_LUN   CAM_LUN_WILDCARD

Definition at line 72 of file cam_debug.h.

◆ CAM_DEBUG_PATH_PRINT

#define CAM_DEBUG_PATH_PRINT (   flag,
  path,
  printfargs 
)
Value:
if (((flag) & (CAM_DEBUG_COMPILE) & cam_dflags)) { \
xpt_print(path, "cam_debug: "); \
printf printfargs; \
if (cam_debug_delay != 0) \
DELAY(cam_debug_delay); \
}

Definition at line 123 of file cam_debug.h.

◆ CAM_DEBUG_PRINT

#define CAM_DEBUG_PRINT (   flag,
  printfargs 
)
Value:
if (((flag) & (CAM_DEBUG_COMPILE) & cam_dflags)) { \
printf("cam_debug: "); \
printf printfargs; \
if (cam_debug_delay != 0) \
DELAY(cam_debug_delay); \
}

Definition at line 115 of file cam_debug.h.

◆ CAM_DEBUG_TARGET

#define CAM_DEBUG_TARGET   CAM_TARGET_WILDCARD

Definition at line 69 of file cam_debug.h.

◆ CAM_DEBUGGED

#define CAM_DEBUGGED (   path,
  flag 
)
Value:
(((flag) & (CAM_DEBUG_COMPILE) & cam_dflags) \
&& (cam_dpath != NULL) \
&& (xpt_path_comp(cam_dpath, path) >= 0) \
&& (xpt_path_comp(cam_dpath, path) < 2))

Definition at line 87 of file cam_debug.h.

Enumeration Type Documentation

◆ cam_debug_flags

Enumerator
CAM_DEBUG_NONE 
CAM_DEBUG_INFO 
CAM_DEBUG_TRACE 
CAM_DEBUG_SUBTRACE 
CAM_DEBUG_CDB 
CAM_DEBUG_XPT 
CAM_DEBUG_PERIPH 
CAM_DEBUG_PROBE 

Definition at line 38 of file cam_debug.h.

Variable Documentation

◆ cam_debug_delay

u_int32_t cam_debug_delay
extern

Definition at line 220 of file cam_xpt.c.

◆ cam_dflags

u_int32_t cam_dflags
extern

Definition at line 217 of file cam_xpt.c.

Referenced by xpt_action_default(), and xpt_config().

◆ cam_dpath

struct cam_path* cam_dpath
extern

Definition at line 216 of file cam_xpt.c.

Referenced by xpt_action_default(), and xpt_config().