summaryrefslogtreecommitdiffstats
path: root/sys/cam/cam_debug.h
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2010-06-08 16:17:25 +0000
committermjacob <mjacob@FreeBSD.org>2010-06-08 16:17:25 +0000
commitdcb98911e2e5ea29226094837697a14d867cecf8 (patch)
tree5d896e3380a4808ce8a95c2d9f0c057108a3c048 /sys/cam/cam_debug.h
parente4e19d26b06529000e3d84472de4c46e4d09e37f (diff)
downloadFreeBSD-src-dcb98911e2e5ea29226094837697a14d867cecf8.zip
FreeBSD-src-dcb98911e2e5ea29226094837697a14d867cecf8.tar.gz
Implement the usage of Report Luns as part of SCSI probing for SCP3 or
better devices. This can be disabled on a per-device basis using quirks as well. This also handles the case where there is actually no connected LUN 0 (which can definitely be the case for storage arrays). Reviewed by: scsi@ MFC after: 1 month
Diffstat (limited to 'sys/cam/cam_debug.h')
-rw-r--r--sys/cam/cam_debug.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/cam/cam_debug.h b/sys/cam/cam_debug.h
index 4b0fd24..857fa43 100644
--- a/sys/cam/cam_debug.h
+++ b/sys/cam/cam_debug.h
@@ -40,7 +40,8 @@ typedef enum {
CAM_DEBUG_SUBTRACE = 0x04, /* internal to routine flows */
CAM_DEBUG_CDB = 0x08, /* print out SCSI CDBs only */
CAM_DEBUG_XPT = 0x10, /* print out xpt scheduling */
- CAM_DEBUG_PERIPH = 0x20 /* print out peripheral calls */
+ CAM_DEBUG_PERIPH = 0x20, /* print out peripheral calls */
+ CAM_DEBUG_PROBE = 0x40 /* print out probe actions */
} cam_debug_flags;
#if defined(CAMDEBUG) && defined(_KERNEL)
@@ -58,6 +59,7 @@ extern u_int32_t cam_debug_delay;
&& (cam_dpath != NULL) \
&& (xpt_path_comp(cam_dpath, path) >= 0) \
&& (xpt_path_comp(cam_dpath, path) < 2))
+
#define CAM_DEBUG(path, flag, printfargs) \
if ((cam_dflags & (flag)) \
&& (cam_dpath != NULL) \
@@ -68,6 +70,7 @@ extern u_int32_t cam_debug_delay;
if (cam_debug_delay != 0) \
DELAY(cam_debug_delay); \
}
+
#define CAM_DEBUG_PRINT(flag, printfargs) \
if (cam_dflags & (flag)) { \
printf("cam_debug: "); \
@@ -76,11 +79,20 @@ extern u_int32_t cam_debug_delay;
DELAY(cam_debug_delay); \
}
+#define CAM_DEBUG_PATH_PRINT(flag, path, printfargs) \
+ if (cam_dflags & (flag)) { \
+ xpt_print(path, "cam_debug: "); \
+ printf printfargs; \
+ if (cam_debug_delay != 0) \
+ DELAY(cam_debug_delay); \
+ }
+
#else /* !CAMDEBUG || !_KERNEL */
#define CAM_DEBUGGED(A, B) 0
#define CAM_DEBUG(A, B, C)
#define CAM_DEBUG_PRINT(A, B)
+#define CAM_DEBUG_PATH_PRINT(A, B, C)
#endif /* CAMDEBUG && _KERNEL */
OpenPOWER on IntegriCloud