diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2006-08-28 02:56:34 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2006-08-28 02:56:34 +0000 |
commit | 52bf9d1ce3d235a12885a9bdec681b7a9d4ed5be (patch) | |
tree | a73001ebad2d6d783fb3a03e0867a5984ff30e67 /sys/dev | |
parent | 1e69b23b895102cd3f37de07e5ff10e29c003da1 (diff) |
make a define for dealing w/ the big bit (0x80); no func change
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/ciss.c | 15 | ||||
-rw-r--r-- | sys/dev/ic/cissreg.h | 4 |
2 files changed, 12 insertions, 7 deletions
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c index a0f65a95665..359d0b61f90 100644 --- a/sys/dev/ic/ciss.c +++ b/sys/dev/ic/ciss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ciss.c,v 1.18 2006/08/28 02:50:14 mickey Exp $ */ +/* $OpenBSD: ciss.c,v 1.19 2006/08/28 02:56:33 mickey Exp $ */ /* * Copyright (c) 2005,2006 Michael Shalayeff @@ -1092,10 +1092,12 @@ ciss_ioctl(struct device *dev, u_long cmd, caddr_t addr) bd->bd_status = -1; if (ldstat->bigrebuild == ldp->tgts[pd]) bd->bd_status = BIOC_SDREBUILD; - if (ciss_bitset(ldp->tgts[pd] & 0x7f, ldstat->bigfailed)) { + if (ciss_bitset(ldp->tgts[pd] & (~CISS_BIGBIT), + ldstat->bigfailed)) { bd->bd_status = BIOC_SDFAILED; bd->bd_size = 0; - bd->bd_channel = (ldp->tgts[pd] & 0x7f) / sc->ndrives; + bd->bd_channel = (ldp->tgts[pd] & (~CISS_BIGBIT)) / + sc->ndrives; bd->bd_target = ldp->tgts[pd] % sc->ndrives; bd->bd_lun = 0; bd->bd_vendor[0] = '\0'; @@ -1135,8 +1137,9 @@ ciss_ioctl(struct device *dev, u_long cmd, caddr_t addr) for (ld = 0; ld < sc->maxunits; ld++) { ldp = sc->sc_lds[ld]; for (pd = 0; pd < ldp->ndrives; pd++) - if (ldp->tgts[pd] == (0x80 + bb->bb_channel * - sc->ndrives + bb->bb_target)) + if (ldp->tgts[pd] == (CISS_BIGBIT + + bb->bb_channel * sc->ndrives + + bb->bb_target)) error = ciss_blink(sc, ld, pd, bb->bb_status, blink); } @@ -1294,7 +1297,7 @@ ciss_pdscan(struct ciss_softc *sc, int ld) pdid = sc->scratch; for (i = 0; i < sc->nbus; i++) for (j = 0; j < sc->ndrives; j++) { - drv = 0x80 + i * sc->ndrives + j; + drv = CISS_BIGBIT + i * sc->ndrives + j; if (!ciss_pdid(sc, drv, pdid, SCSI_NOSLEEP|SCSI_POLL)) buf[k++] = drv; } diff --git a/sys/dev/ic/cissreg.h b/sys/dev/ic/cissreg.h index 5fb7afd018f..34fc85b9aa8 100644 --- a/sys/dev/ic/cissreg.h +++ b/sys/dev/ic/cissreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cissreg.h,v 1.6 2006/08/28 02:50:14 mickey Exp $ */ +/* $OpenBSD: cissreg.h,v 1.7 2006/08/28 02:56:33 mickey Exp $ */ /* * Copyright (c) 2005,2006 Michael Shalayeff @@ -17,6 +17,8 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#define CISS_BIGBIT 0x80 /* texas radio and the big beat! */ + #define CISS_IDB 0x20 #define CISS_IDB_CFG 0x01 #define CISS_ISR 0x30 |