summaryrefslogtreecommitdiff
path: root/sys/scsi/scsiconf.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-28 13:20:38 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-28 13:20:38 +0000
commit1f147e6ea07ae37a64709a94b8cb857f795fdf0a (patch)
tree4f5058b9e77d723fb6337c4b94b2a7056c72c2ec /sys/scsi/scsiconf.c
parent7de436700562d3b13efcd70e4596195f85809d3c (diff)
Make SCSI debugging more dynamic, more targets and luns can be
debugged simultaneously and which ones, as well as the verbosity, can be determined at runtime.
Diffstat (limited to 'sys/scsi/scsiconf.c')
-rw-r--r--sys/scsi/scsiconf.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 338bfc5efc0..1a50875ccc7 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -1,4 +1,4 @@
-/* $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 $ */
/*
@@ -96,6 +96,10 @@ struct cfdriver scsibus_cd = {
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
@@ -533,8 +537,9 @@ scsi_probedev(scsi, target, lun)
* 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,