From 52bf9d1ce3d235a12885a9bdec681b7a9d4ed5be Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Mon, 28 Aug 2006 02:56:34 +0000 Subject: make a define for dealing w/ the big bit (0x80); no func change --- sys/dev/ic/ciss.c | 15 +++++++++------ sys/dev/ic/cissreg.h | 4 +++- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'sys/dev') 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 -- cgit v1.2.3