-/* $OpenBSD: scsi_debug.h,v 1.3 1996/10/31 01:09:22 niklas Exp $ */
+/* $OpenBSD: scsi_debug.h,v 1.4 1996/11/28 13:20:36 niklas Exp $ */
/* $NetBSD: scsi_debug.h,v 1.5 1994/12/28 19:43:00 mycroft Exp $ */
/*
#define SDEV_DB3 0x0040 /* internal to routine flows */
#define SDEV_DB4 0x0080 /* level 4 debugging for this dev */
-/* target and LUN we want to debug */
-#define DEBUGTARGET -1 /* -1 = disable */
-#define DEBUGLUN 0
-#define DEBUGLEVEL (SDEV_DB1|SDEV_DB2)
-
+/* targets and LUNs we want to debug */
+#ifndef SCSIDEBUG_TARGETS
+#define SCSIDEBUG_TARGETS 0
+#endif
+#ifndef SCSIDEBUG_LUNS
+#define SCSIDEBUG_LUNS 0
+#endif
+#ifndef SCSIDEBUG_LEVEL
+#define SCSIDEBUG_LEVEL (SDEV_DB1|SDEV_DB2)
+#endif
+
+extern int scsidebug_targets, scsidebug_luns, scsidebug_level;
+
/*
* This is the usual debug macro for use with the above bits
*/
-/* $OpenBSD: scsiconf.c,v 1.18 1996/11/25 04:49:23 millert Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.19 1996/11/28 13:20:37 niklas Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
NULL, "scsibus", DV_DULL
};
+int scsidebug_targets = SCSIDEBUG_TARGETS;
+int scsidebug_luns = SCSIDEBUG_LUNS;
+int scsidebug_level = SCSIDEBUG_LEVEL;
+
int scsibusprint __P((void *, const char *));
int
* Ask the device what it is
*/
#ifdef SCSIDEBUG
- if (target == DEBUGTARGET && lun == DEBUGLUN)
- sc_link->flags |= DEBUGLEVEL;
+ if (((1 << target) & scsidebug_targets) &&
+ ((1 << lun) & scsidebug_luns))
+ sc_link->flags |= scsidebug_level;
#endif /* SCSIDEBUG */
(void) scsi_test_unit_ready(sc_link,