diff options
author | 2011-06-21 22:36:42 +0000 | |
---|---|---|
committer | 2011-06-21 22:36:42 +0000 | |
commit | 6ff7dde055ad2a5335171f9957c6d3051b40f519 (patch) | |
tree | 60b1b9f4cb86bad7d06d6e4be91d02c0c24cc9ed | |
parent | do the unaligned dma tests so we can figure out if we need to fall (diff) | |
download | wireguard-openbsd-6ff7dde055ad2a5335171f9957c6d3051b40f519.tar.xz wireguard-openbsd-6ff7dde055ad2a5335171f9957c6d3051b40f519.zip |
scsi_link's scsibus field is redundant with bus->sc_dev.dv_unit, so
remove two of the remaining three uses of it. (softraid(4) still uses
it at the moment, so the field and its assignment in scsibusattach()
stay for now...)
ok krw@; feedback and "tenteiramen rejid"(!?) miod@
-rw-r--r-- | sys/scsi/scsi_debug.h | 5 | ||||
-rw-r--r-- | sys/scsi/scsi_ioctl.c | 4 | ||||
-rw-r--r-- | sys/scsi/scsiconf.c | 15 |
3 files changed, 13 insertions, 11 deletions
diff --git a/sys/scsi/scsi_debug.h b/sys/scsi/scsi_debug.h index 66f2e4890f8..6700e288edf 100644 --- a/sys/scsi/scsi_debug.h +++ b/sys/scsi/scsi_debug.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_debug.h,v 1.9 2008/11/10 18:04:41 deraadt Exp $ */ +/* $OpenBSD: scsi_debug.h,v 1.10 2011/06/21 22:36:42 matthew Exp $ */ /* $NetBSD: scsi_debug.h,v 1.7 1996/10/12 23:23:16 christos Exp $ */ /* @@ -33,7 +33,8 @@ #endif -extern int scsidebug_buses, scsidebug_targets, scsidebug_luns, scsidebug_level; +extern u_int32_t scsidebug_buses, scsidebug_targets, scsidebug_luns; +extern int scsidebug_level; /* * This is the usual debug macro for use with the above bits diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c index 51443b2ba10..fbd56a467a7 100644 --- a/sys/scsi/scsi_ioctl.c +++ b/sys/scsi/scsi_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_ioctl.c,v 1.47 2011/03/17 21:30:24 deraadt Exp $ */ +/* $OpenBSD: scsi_ioctl.c,v 1.48 2011/06/21 22:36:42 matthew Exp $ */ /* $NetBSD: scsi_ioctl.c,v 1.23 1996/10/12 23:23:17 christos Exp $ */ /* @@ -314,7 +314,7 @@ scsi_do_ioctl(struct scsi_link *sc_link, u_long cmd, caddr_t addr, int flag) else /* An 'emulated' SCSI target. */ sca->type = TYPE_ATAPI; - sca->scbus = sc_link->scsibus; + sca->scbus = sc_link->bus->sc_dev.dv_unit; sca->target = sc_link->target; sca->lun = sc_link->lun; return (0); diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index 07448b7bd65..45748d2b7a0 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.c,v 1.175 2011/05/04 20:49:41 sthen Exp $ */ +/* $OpenBSD: scsiconf.c,v 1.176 2011/06/21 22:36:42 matthew Exp $ */ /* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */ /* @@ -98,9 +98,9 @@ struct cfdriver scsibus_cd = { }; #ifdef SCSIDEBUG -int scsidebug_buses = SCSIDEBUG_BUSES; -int scsidebug_targets = SCSIDEBUG_TARGETS; -int scsidebug_luns = SCSIDEBUG_LUNS; +u_int32_t scsidebug_buses = SCSIDEBUG_BUSES; +u_int32_t scsidebug_targets = SCSIDEBUG_TARGETS; +u_int32_t scsidebug_luns = SCSIDEBUG_LUNS; int scsidebug_level = SCSIDEBUG_LEVEL; #endif @@ -902,9 +902,10 @@ scsi_probedev(struct scsibus_softc *scsi, int target, int lun) * Ask the device what it is */ #ifdef SCSIDEBUG - if (((1 << sc_link->scsibus) & scsidebug_buses) && - ((target < 32) && ((1 << target) & scsidebug_targets)) && - ((lun < 32) && ((1 << lun) & scsidebug_luns))) + if (((scsi->sc_dev.dv_unit < 32) && + ((1U << scsi->sc_dev.dv_unit) & scsidebug_buses)) && + ((target < 32) && ((1U << target) & scsidebug_targets)) && + ((lun < 32) && ((1U << lun) & scsidebug_luns))) sc_link->flags |= scsidebug_level; #endif /* SCSIDEBUG */ |