summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/cam/cam_debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/cam/cam_debug.h')
-rw-r--r--freebsd/sys/cam/cam_debug.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/freebsd/sys/cam/cam_debug.h b/freebsd/sys/cam/cam_debug.h
index 37acd7dc..7b619a29 100644
--- a/freebsd/sys/cam/cam_debug.h
+++ b/freebsd/sys/cam/cam_debug.h
@@ -61,13 +61,13 @@ typedef enum {
#endif
#ifndef CAM_DEBUG_BUS
-#define CAM_DEBUG_BUS (-1)
+#define CAM_DEBUG_BUS CAM_BUS_WILDCARD
#endif
#ifndef CAM_DEBUG_TARGET
-#define CAM_DEBUG_TARGET (-1)
+#define CAM_DEBUG_TARGET CAM_TARGET_WILDCARD
#endif
#ifndef CAM_DEBUG_LUN
-#define CAM_DEBUG_LUN (-1)
+#define CAM_DEBUG_LUN CAM_LUN_WILDCARD
#endif
#ifndef CAM_DEBUG_DELAY
@@ -99,6 +99,17 @@ extern u_int32_t cam_debug_delay;
DELAY(cam_debug_delay); \
}
+#define CAM_DEBUG_DEV(dev, flag, printfargs) \
+ 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); \
+ }
+
#define CAM_DEBUG_PRINT(flag, printfargs) \
if (((flag) & (CAM_DEBUG_COMPILE) & cam_dflags)) { \
printf("cam_debug: "); \