CL* discarding.

This commit is contained in:
ragge 1999-12-04 12:11:13 +00:00
parent b5c8739b96
commit 6aabd4d0c2
4 changed files with 12 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_de.c,v 1.86 1999/06/01 19:17:59 thorpej Exp $ */
/* $NetBSD: if_de.c,v 1.87 1999/12/04 12:11:13 ragge Exp $ */
/*-
* Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com)
@ -4400,7 +4400,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 = NBPG - (((u_long) addr) & PGOFSET);
while (len > 0) {
unsigned slen = min(len, clsize);
@ -4462,7 +4462,7 @@ tulip_txput(
if (partial)
continue;
#endif
clsize = CLBYTES;
clsize = NBPG;
}
} while ((m0 = m0->m_next) != NULL);
#endif /* TULIP_BUS_DMA */
@ -5111,7 +5111,7 @@ tulip_busdma_allocmem(
{
bus_dma_segment_t segs[1];
int nsegs, error;
error = bus_dmamem_alloc(sc->tulip_dmatag, size, 1, CLBYTES,
error = bus_dmamem_alloc(sc->tulip_dmatag, size, 1, NBPG,
segs, sizeof(segs)/sizeof(segs[0]),
&nsegs, BUS_DMA_NOWAIT);
if (error == 0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_lmc.c,v 1.1 1999/03/25 03:32:43 explorer Exp $ */
/* $NetBSD: if_lmc.c,v 1.2 1999/12/04 12:11:13 ragge Exp $ */
/*-
* Copyright (c) 1997-1999 LAN Media Corporation (LMC)
@ -945,7 +945,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 = NBPG - (((u_long) addr) & PGOFSET);
while (len > 0) {
unsigned slen = min(len, clsize);
@ -1010,7 +1010,7 @@ lmc_txput(lmc_softc_t * const sc, struct mbuf *m)
if (partial)
continue;
#endif
clsize = CLBYTES;
clsize = NBPG;
}
} while ((m0 = m0->m_next) != NULL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: iso_chksum.c,v 1.11 1998/07/05 04:37:43 jonathan Exp $ */
/* $NetBSD: iso_chksum.c,v 1.12 1999/12/04 12:16:02 ragge Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -207,7 +207,7 @@ iso_gen_csum(m, n, l)
#endif
while (i < l) {
len = min(m->m_len, CLBYTES);
len = min(m->m_len, NBPG);
/* RAH: don't cksum more than l bytes */
len = min(len, l - i);

View File

@ -1,4 +1,4 @@
/* $NetBSD: lfs_bio.c,v 1.14 1999/11/23 23:52:42 fvdl Exp $ */
/* $NetBSD: lfs_bio.c,v 1.15 1999/12/04 12:18:21 ragge Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -115,8 +115,8 @@ extern int lfs_dostats;
#define LFS_MAX_BUFS ((nbuf >> 2) - 10)
#define LFS_WAIT_BUFS ((nbuf >> 1) - (nbuf >> 3) - 10)
/* These are new ... is LFS taking up too much memory in its buffers? */
#define LFS_MAX_BYTES (((bufpages >> 2) - 10) * CLBYTES)
#define LFS_WAIT_BYTES (((bufpages >> 1) - (bufpages >> 3) - 10) * CLBYTES)
#define LFS_MAX_BYTES (((bufpages >> 2) - 10) * NBPG)
#define LFS_WAIT_BYTES (((bufpages >> 1) - (bufpages >> 3) - 10) * NBPG)
#define LFS_BUFWAIT 2
/*
*