diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2004-01-25 00:09:21 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2004-01-25 00:09:21 +0000 |
commit | 235d9c2b971fb91a6a812a9a81f8e1e60ce26bf8 (patch) | |
tree | 1db2c24c748985abe9a7cc97238a6abd944bb43f /sys/scsi | |
parent | da6ac648be01032c927441fd8d201d05ce6dd263 (diff) |
Allow restriction of SCSIDEBUG output to particular scsi buses in
addition to device targets and luns.
ok deraadt@.
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/scsi_debug.h | 8 | ||||
-rw-r--r-- | sys/scsi/scsiconf.c | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/sys/scsi/scsi_debug.h b/sys/scsi/scsi_debug.h index e9452fceab2..caf8b5db069 100644 --- a/sys/scsi/scsi_debug.h +++ b/sys/scsi/scsi_debug.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_debug.h,v 1.7 1997/09/05 05:56:49 millert Exp $ */ +/* $OpenBSD: scsi_debug.h,v 1.8 2004/01/25 00:09:20 krw Exp $ */ /* $NetBSD: scsi_debug.h,v 1.7 1996/10/12 23:23:16 christos Exp $ */ /* @@ -18,6 +18,9 @@ #define SDEV_DB4 0x0080 /* level 4 debugging for this dev */ /* targets and LUNs we want to debug */ +#ifndef SCSIDEBUG_BUSES +#define SCSIDEBUG_BUSES 0 +#endif #ifndef SCSIDEBUG_TARGETS #define SCSIDEBUG_TARGETS 0 #endif @@ -28,7 +31,8 @@ #define SCSIDEBUG_LEVEL (SDEV_DB1|SDEV_DB2) #endif -extern int scsidebug_targets, scsidebug_luns, scsidebug_level; + +extern int scsidebug_buses, scsidebug_targets, scsidebug_luns, scsidebug_level; /* * This is the usual debug macro for use with the above bits diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index 936a2f02091..8741aced99c 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.c,v 1.80 2004/01/24 22:01:46 deraadt Exp $ */ +/* $OpenBSD: scsiconf.c,v 1.81 2004/01/25 00:09:20 krw Exp $ */ /* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */ /* @@ -104,6 +104,7 @@ struct cfdriver scsibus_cd = { NULL, "scsibus", DV_DULL }; +int scsidebug_buses = SCSIDEBUG_BUSES; int scsidebug_targets = SCSIDEBUG_TARGETS; int scsidebug_luns = SCSIDEBUG_LUNS; int scsidebug_level = SCSIDEBUG_LEVEL; @@ -650,7 +651,8 @@ scsi_probedev(scsi, inqbuflun0, target, lun) * Ask the device what it is */ #ifdef SCSIDEBUG - if (((1 << target) & scsidebug_targets) && + if (((1 << sc_link->scsibus) & scsidebug_buses) && + ((1 << target) & scsidebug_targets) && ((1 << lun) & scsidebug_luns)) sc_link->flags |= scsidebug_level; #endif /* SCSIDEBUG */ |