summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ccd.c17
-rw-r--r--sys/dev/pci/if_de.c6
-rw-r--r--sys/dev/pci/if_devar.h3
-rw-r--r--sys/dev/pci/if_lmc.c6
-rw-r--r--sys/dev/pci/if_lmcvar.h3
5 files changed, 16 insertions, 19 deletions
diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c
index f978f516e59..78069096bd8 100644
--- a/sys/dev/ccd.c
+++ b/sys/dev/ccd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ccd.c,v 1.41 1999/11/26 16:46:17 art Exp $ */
+/* $OpenBSD: ccd.c,v 1.42 2001/05/05 20:56:58 art Exp $ */
/* $NetBSD: ccd.c,v 1.33 1996/05/05 04:21:14 thorpej Exp $ */
/*-
@@ -222,7 +222,7 @@ getccdbuf()
cbp = malloc(sizeof (struct ccdbuf), M_DEVBUF, M_WAITOK);
bzero(cbp, sizeof (struct ccdbuf));
- cbp->cb_sg = malloc(sizeof (struct ccdseg) * MAXBSIZE / CLBYTES,
+ cbp->cb_sg = malloc(sizeof (struct ccdseg) * MAXBSIZE >> PAGE_SHIFT,
M_DEVBUF, M_WAITOK);
return (cbp);
}
@@ -777,14 +777,14 @@ ccdstart(cs, bp)
M_WAITOK);
bzero(cbpp, 2 * cs->sc_nccdisks * sizeof(struct ccdbuf *));
addr = bp->b_data;
- old_io = old_io || ((vaddr_t)addr & CLOFSET); /* XXX !claligned */
+ old_io = old_io || ((vaddr_t)addr & PAGE_MASK);
for (bcount = bp->b_bcount; bcount > 0; bcount -= rcount) {
rcount = ccdbuffer(cs, bp, bn, addr, bcount, cbpp, old_io);
/*
* This is the old, slower, but less restrictive, mode of
* operation. It allows interleaves which are not multiples
- * of CLBYTES and mirroring.
+ * of PAGE_SIZE and mirroring.
*/
if (old_io) {
if ((cbpp[0]->cb_buf.b_flags & B_READ) == 0)
@@ -989,9 +989,8 @@ ccdbuffer(cs, bp, bn, addr, bcount, cbpp, old_io)
printf("ccdbuffer: sg %d (%p/%x) off %x\n",
cbp->cb_sgcnt, addr, bcount, old_bcount);
#endif
- pagemove(addr, nbp->b_data + old_bcount,
- clrnd(round_page(bcount)));
- nbp->b_bufsize += clrnd(round_page(bcount));
+ pagemove(addr, nbp->b_data + old_bcount, round_page(bcount));
+ nbp->b_bufsize += round_page(bcount);
cbp->cb_sg[cbp->cb_sgcnt].cs_sgaddr = addr;
cbp->cb_sg[cbp->cb_sgcnt].cs_sglen = bcount;
cbp->cb_sgcnt++;
@@ -1087,7 +1086,7 @@ ccdiodone(vbp)
cbp->cb_sg[i].cs_sglen, off);
#endif
pagemove(vbp->b_data + off, cbp->cb_sg[i].cs_sgaddr,
- clrnd(round_page(cbp->cb_sg[i].cs_sglen)));
+ round_page(cbp->cb_sg[i].cs_sglen));
off += cbp->cb_sg[i].cs_sglen;
}
@@ -1226,7 +1225,7 @@ ccdioctl(dev, cmd, data, flag, p)
* must use the old I/O code (by design), as must mirror
* setups (until implemented in the new code).
*/
- if (ccio->ccio_ileave % (CLBYTES / DEV_BSIZE) != 0 ||
+ if (ccio->ccio_ileave % (PAGE_SIZE / DEV_BSIZE) != 0 ||
(ccd.ccd_flags & CCDF_MIRROR))
ccd.ccd_flags |= CCDF_OLD;
diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c
index ac8a9d3a131..25a84dd719b 100644
--- a/sys/dev/pci/if_de.c
+++ b/sys/dev/pci/if_de.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_de.c,v 1.44 2001/02/03 06:10:17 mickey Exp $ */
+/* $OpenBSD: if_de.c,v 1.45 2001/05/05 20:56:58 art Exp $ */
/* $NetBSD: if_de.c,v 1.45 1997/06/09 00:34:18 thorpej Exp $ */
/*-
@@ -4153,7 +4153,7 @@ tulip_txput(
do {
int len = m0->m_len;
caddr_t addr = mtod(m0, caddr_t);
- unsigned clsize = CLBYTES - (((u_long) addr) & (CLBYTES-1));
+ unsigned clsize = PAGE_SIZE - (((u_long) addr) & PAGE_MASK);
while (len > 0) {
unsigned slen = min(len, clsize);
@@ -4226,7 +4226,7 @@ tulip_txput(
if (partial)
continue;
#endif
- clsize = CLBYTES;
+ clsize = PAGE_SIZE;
}
} while ((m0 = m0->m_next) != NULL);
diff --git a/sys/dev/pci/if_devar.h b/sys/dev/pci/if_devar.h
index 1bc0bd48bfc..09c870ef491 100644
--- a/sys/dev/pci/if_devar.h
+++ b/sys/dev/pci/if_devar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_devar.h,v 1.11 2001/02/20 19:39:42 mickey Exp $ */
+/* $OpenBSD: if_devar.h,v 1.12 2001/05/05 20:56:59 art Exp $ */
/* $NetBSD: if_devar.h,v 1.13 1997/06/08 18:46:36 thorpej Exp $ */
/*-
@@ -890,7 +890,6 @@ static tulip_softc_t *tulips[TULIP_MAX_DEVICES];
#define tulip_intrfunc_t void
#define TULIP_VOID_INTRFUNC
#define IFF_NOTRAILERS 0
-#define CLBYTES PAGE_SIZE
#if 0
#define TULIP_KVATOPHYS(sc, va) kvtop(va)
#endif
diff --git a/sys/dev/pci/if_lmc.c b/sys/dev/pci/if_lmc.c
index cc3989f1b76..98dc7e04620 100644
--- a/sys/dev/pci/if_lmc.c
+++ b/sys/dev/pci/if_lmc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_lmc.c,v 1.6 2000/04/27 00:32:09 chris Exp $ */
+/* $OpenBSD: if_lmc.c,v 1.7 2001/05/05 20:56:59 art Exp $ */
/* $NetBSD: if_lmc.c,v 1.1 1999/03/25 03:32:43 explorer Exp $ */
/*-
@@ -1045,7 +1045,7 @@ lmc_txput(lmc_softc_t * const sc, struct mbuf *m)
do {
int len = m0->m_len;
caddr_t addr = mtod(m0, caddr_t);
- unsigned clsize = CLBYTES - (((u_long) addr) & (CLBYTES-1));
+ unsigned clsize = PAGE_SIZE - (((u_long) addr) & PAGE_MASK);
while (len > 0) {
unsigned slen = min(len, clsize);
@@ -1110,7 +1110,7 @@ lmc_txput(lmc_softc_t * const sc, struct mbuf *m)
if (partial)
continue;
#endif
- clsize = CLBYTES;
+ clsize = PAGE_SIZE;
}
} while ((m0 = m0->m_next) != NULL);
diff --git a/sys/dev/pci/if_lmcvar.h b/sys/dev/pci/if_lmcvar.h
index 3e5fd0b1cb7..ef046d7f3b8 100644
--- a/sys/dev/pci/if_lmcvar.h
+++ b/sys/dev/pci/if_lmcvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_lmcvar.h,v 1.4 2000/02/06 20:56:02 chris Exp $ */
+/* $OpenBSD: if_lmcvar.h,v 1.5 2001/05/05 20:56:59 art Exp $ */
/* $NetBSD: if_lmcvar.h,v 1.1 1999/03/25 03:32:43 explorer Exp $ */
/*-
@@ -463,7 +463,6 @@ static lmc_softc_t *tulips[LMC_MAX_DEVICES];
#endif
#define LMC_VOID_INTRFUNC
#define IFF_NOTRAILERS 0
-#define CLBYTES PAGE_SIZE
#define LMC_EADDR_FMT "%6D"
#define LMC_EADDR_ARGS(addr) addr, ":"
#else