diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/am7990.c | 10 | ||||
-rw-r--r-- | sys/dev/ic/am7990reg.h | 7 | ||||
-rw-r--r-- | sys/dev/ic/anvar.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/mtd8xx.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/mtd8xxvar.h | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_bge.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/if_bgereg.h | 3 | ||||
-rw-r--r-- | sys/dev/pci/if_lgereg.h | 3 | ||||
-rw-r--r-- | sys/dev/pci/if_sis.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/if_sisreg.h | 7 | ||||
-rw-r--r-- | sys/dev/pci/if_vrreg.h | 3 | ||||
-rw-r--r-- | sys/dev/pci/if_wb.c | 6 |
12 files changed, 27 insertions, 36 deletions
diff --git a/sys/dev/ic/am7990.c b/sys/dev/ic/am7990.c index 2202dc534df..4e948402d75 100644 --- a/sys/dev/ic/am7990.c +++ b/sys/dev/ic/am7990.c @@ -1,4 +1,4 @@ -/* $OpenBSD: am7990.c,v 1.35 2004/06/01 12:58:51 mcbride Exp $ */ +/* $OpenBSD: am7990.c,v 1.36 2004/09/28 04:37:32 brad Exp $ */ /* $NetBSD: am7990.c,v 1.22 1996/10/13 01:37:19 christos Exp $ */ /*- @@ -198,9 +198,9 @@ am7990_config(sc) sc->sc_tmdaddr = mem; mem += sizeof(struct letmd) * sc->sc_ntbuf; sc->sc_rbufaddr = mem; - mem += LEBLEN * sc->sc_nrbuf; + mem += ETHER_MAX_DIX_LEN * sc->sc_nrbuf; sc->sc_tbufaddr = mem; - mem += LEBLEN * sc->sc_ntbuf; + mem += ETHER_MAX_DIX_LEN * sc->sc_ntbuf; #ifdef notyet if (mem > ...) panic(...); @@ -266,7 +266,7 @@ am7990_meminit(sc) rmd.rmd0 = a; rmd.rmd1_hadr = a >> 16; rmd.rmd1_bits = LE_R1_OWN; - rmd.rmd2 = -LEBLEN | LE_XMD2_ONES; + rmd.rmd2 = -ETHER_MAX_DIX_LEN | LE_XMD2_ONES; rmd.rmd3 = 0; (*sc->sc_copytodesc)(sc, &rmd, LE_RMDADDR(sc, bix), sizeof(rmd)); @@ -549,7 +549,7 @@ am7990_rint(sc) } rmd.rmd1_bits = LE_R1_OWN; - rmd.rmd2 = -LEBLEN | LE_XMD2_ONES; + rmd.rmd2 = -ETHER_MAX_DIX_LEN | LE_XMD2_ONES; rmd.rmd3 = 0; (*sc->sc_copytodesc)(sc, &rmd, rp, sizeof(rmd)); diff --git a/sys/dev/ic/am7990reg.h b/sys/dev/ic/am7990reg.h index b3f7748b18b..01c121b7fd0 100644 --- a/sys/dev/ic/am7990reg.h +++ b/sys/dev/ic/am7990reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: am7990reg.h,v 1.6 2003/10/21 18:58:48 jmc Exp $ */ +/* $OpenBSD: am7990reg.h,v 1.7 2004/09/28 04:37:32 brad Exp $ */ /* $NetBSD: am7990reg.h,v 1.1 1995/04/11 04:17:50 mycroft Exp $ */ /*- @@ -41,7 +41,6 @@ * http://www.amd.com/products/npd/techdocs/techdocs.html */ -#define LEBLEN 1536 /* ETHERMTU + header + CRC */ #define LEMINSIZE 60 /* should be 64 if mode DTCR is set */ /* @@ -93,8 +92,8 @@ struct leinit { #define LE_INITADDR(sc) (sc->sc_initaddr) #define LE_RMDADDR(sc, bix) (sc->sc_rmdaddr + sizeof(struct lermd) * (bix)) #define LE_TMDADDR(sc, bix) (sc->sc_tmdaddr + sizeof(struct letmd) * (bix)) -#define LE_RBUFADDR(sc, bix) (sc->sc_rbufaddr + LEBLEN * (bix)) -#define LE_TBUFADDR(sc, bix) (sc->sc_tbufaddr + LEBLEN * (bix)) +#define LE_RBUFADDR(sc, bix) (sc->sc_rbufaddr + ETHER_MAX_DIX_LEN * (bix)) +#define LE_TBUFADDR(sc, bix) (sc->sc_tbufaddr + ETHER_MAX_DIX_LEN * (bix)) /* register addresses */ #define LE_CSR0 0x0000 /* Control and status register */ diff --git a/sys/dev/ic/anvar.h b/sys/dev/ic/anvar.h index d5de20c0622..519d8e2eb88 100644 --- a/sys/dev/ic/anvar.h +++ b/sys/dev/ic/anvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: anvar.h,v 1.16 2004/08/05 07:58:55 mickey Exp $ */ +/* $OpenBSD: anvar.h,v 1.17 2004/09/28 04:37:32 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -654,7 +654,7 @@ struct an_softc { int an_rxmode; int an_gone; int an_if_flags; - u_int8_t an_txbuf[1536]; + u_int8_t an_txbuf[ETHER_MAX_DIX_LEN]; struct an_tx_ring_data an_rdata; struct an_ltv_stats an_stats; struct an_ltv_status an_status; diff --git a/sys/dev/ic/mtd8xx.c b/sys/dev/ic/mtd8xx.c index f711c70f7b9..df72c1cd56b 100644 --- a/sys/dev/ic/mtd8xx.c +++ b/sys/dev/ic/mtd8xx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mtd8xx.c,v 1.6 2004/09/23 17:45:16 brad Exp $ */ +/* $OpenBSD: mtd8xx.c,v 1.7 2004/09/28 04:37:32 brad Exp $ */ /* * Copyright (c) 2003 Oleg Safiullin <form@pdp11.org.ru> @@ -538,7 +538,7 @@ mtd_newbuf(struct mtd_softc *sc, int i, struct mbuf *m) c->rd_buf = htole32( sc->mtd_cdata.mtd_rx_chain[i].sd_map->dm_segs[0].ds_addr + sizeof(u_int64_t)); - c->rd_rcw = htole32(MTD_RXLEN); + c->rd_rcw = htole32(ETHER_MAX_DIX_LEN); c->rd_rsr = htole32(RSR_OWN); bus_dmamap_sync(sc->sc_dmat, sc->sc_listmap, diff --git a/sys/dev/ic/mtd8xxvar.h b/sys/dev/ic/mtd8xxvar.h index 022563c2a24..0552a699fde 100644 --- a/sys/dev/ic/mtd8xxvar.h +++ b/sys/dev/ic/mtd8xxvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mtd8xxvar.h,v 1.2 2003/10/21 18:58:49 jmc Exp $ */ +/* $OpenBSD: mtd8xxvar.h,v 1.3 2004/09/28 04:37:32 brad Exp $ */ /* * Copyright (c) 2003 Oleg Safiullin <form@pdp11.org.ru> @@ -33,8 +33,6 @@ #define MTD_RX_LIST_CNT 64 #define MTD_TX_LIST_CNT 128 -#define MTD_RXLEN 1536 - /* * Transmit descriptor structure. diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index 4f3f6d4ab6d..3694b333115 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bge.c,v 1.32 2004/09/23 17:45:16 brad Exp $ */ +/* $OpenBSD: if_bge.c,v 1.33 2004/09/28 04:37:32 brad Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2001 @@ -1186,7 +1186,7 @@ bge_blockinit(sc) rcb->bge_maxlen_flags = BGE_RCB_MAXLEN_FLAGS(512, 0); else rcb->bge_maxlen_flags = - BGE_RCB_MAXLEN_FLAGS(BGE_MAX_FRAMELEN, 0); + BGE_RCB_MAXLEN_FLAGS(ETHER_MAX_DIX_LEN, 0); if (sc->bge_extram) rcb->bge_nicaddr = BGE_EXT_STD_RX_RINGS; else @@ -1208,7 +1208,7 @@ bge_blockinit(sc) BGE_HOSTADDR(rcb->bge_hostaddr, BGE_RING_DMA_ADDR(sc, bge_rx_jumbo_ring)); rcb->bge_maxlen_flags = - BGE_RCB_MAXLEN_FLAGS(BGE_MAX_FRAMELEN, + BGE_RCB_MAXLEN_FLAGS(ETHER_MAX_DIX_LEN, BGE_RCB_FLAG_RING_DISABLED); if (sc->bge_extram) rcb->bge_nicaddr = BGE_EXT_JUMBO_RX_RINGS; diff --git a/sys/dev/pci/if_bgereg.h b/sys/dev/pci/if_bgereg.h index 6d5eee9df52..7169b0f4a53 100644 --- a/sys/dev/pci/if_bgereg.h +++ b/sys/dev/pci/if_bgereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bgereg.h,v 1.10 2004/08/05 19:57:17 brad Exp $ */ +/* $OpenBSD: if_bgereg.h,v 1.11 2004/09/28 04:37:32 brad Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2001 @@ -2036,7 +2036,6 @@ struct bge_gib { * boundary. */ -#define BGE_MAX_FRAMELEN 1536 #define BGE_PAGE_SIZE PAGE_SIZE #define BGE_MIN_FRAMELEN 60 diff --git a/sys/dev/pci/if_lgereg.h b/sys/dev/pci/if_lgereg.h index 719cfa18c76..65daf1b0537 100644 --- a/sys/dev/pci/if_lgereg.h +++ b/sys/dev/pci/if_lgereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lgereg.h,v 1.3 2004/08/05 19:57:17 brad Exp $ */ +/* $OpenBSD: if_lgereg.h,v 1.4 2004/09/28 04:37:33 brad Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -551,7 +551,6 @@ struct lge_softc { bus_space_read_1(sc->lge_btag, sc->lge_bhandle, reg) #define LGE_TIMEOUT 1000 -#define LGE_RXLEN 1536 #define LGE_MIN_FRAMELEN 60 /* diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c index 5665d2c53ed..d2d045ed382 100644 --- a/sys/dev/pci/if_sis.c +++ b/sys/dev/pci/if_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sis.c,v 1.41 2004/09/23 17:45:16 brad Exp $ */ +/* $OpenBSD: if_sis.c,v 1.42 2004/09/28 04:37:33 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -1128,9 +1128,7 @@ void sis_attach(parent, self, aux) IFQ_SET_READY(&ifp->if_snd); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); -#if NVLAN > 0 ifp->if_capabilities |= IFCAP_VLAN_MTU; -#endif sc->sc_mii.mii_ifp = ifp; sc->sc_mii.mii_readreg = sis_miibus_readreg; @@ -1284,7 +1282,7 @@ int sis_newbuf(sc, c, m) c->sis_mbuf = m_new; c->sis_ptr = c->map->dm_segs[0].ds_addr + sizeof(u_int64_t); - c->sis_ctl = SIS_RXLEN; + c->sis_ctl = ETHER_MAX_DIX_LEN; bus_dmamap_sync(sc->sc_dmat, sc->sc_listmap, ((caddr_t)c - sc->sc_listkva), sizeof(struct sis_desc), diff --git a/sys/dev/pci/if_sisreg.h b/sys/dev/pci/if_sisreg.h index c6ad494cfd0..bb0a370fb9b 100644 --- a/sys/dev/pci/if_sisreg.h +++ b/sys/dev/pci/if_sisreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sisreg.h,v 1.18 2004/07/04 22:57:20 deraadt Exp $ */ +/* $OpenBSD: if_sisreg.h,v 1.19 2004/09/28 04:37:33 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. @@ -238,11 +238,11 @@ #define SIS_TXCFG_100 \ (SIS_TXDMA_64BYTES|SIS_TXCFG_AUTOPAD|\ - SIS_TXCFG_FILL(64)|SIS_TXCFG_DRAIN(1536)) + SIS_TXCFG_FILL(ETHER_MIN_LEN)|SIS_TXCFG_DRAIN(ETHER_MAX_DIX_LEN)) #define SIS_TXCFG_10 \ (SIS_TXDMA_32BYTES|SIS_TXCFG_AUTOPAD|\ - SIS_TXCFG_FILL(64)|SIS_TXCFG_DRAIN(1536)) + SIS_TXCFG_FILL(ETHER_MIN_LEN)|SIS_TXCFG_DRAIN(ETHER_MAX_DIX_LEN)) #define SIS_RXCFG_DRAIN_THRESH 0x0000003E /* 8-byte units */ #define SIS_RXCFG_DMABURST 0x00700000 @@ -453,7 +453,6 @@ struct sis_softc { bus_space_read_4(sc->sis_btag, sc->sis_bhandle, reg) #define SIS_TIMEOUT 1000 -#define SIS_RXLEN 1536 #define SIS_MIN_FRAMELEN 60 /* diff --git a/sys/dev/pci/if_vrreg.h b/sys/dev/pci/if_vrreg.h index f6e27bf80f1..f7240b9583b 100644 --- a/sys/dev/pci/if_vrreg.h +++ b/sys/dev/pci/if_vrreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vrreg.h,v 1.12 2004/05/19 11:37:00 brad Exp $ */ +/* $OpenBSD: if_vrreg.h,v 1.13 2004/09/28 04:37:33 brad Exp $ */ /* * Copyright (c) 1997, 1998 @@ -393,7 +393,6 @@ struct vr_desc { #define VR_RX_LIST_CNT 64 #define VR_TX_LIST_CNT 128 #define VR_MIN_FRAMELEN 60 -#define VR_FRAMELEN 1536 #define VR_RXLEN 1520 #define VR_TXOWN(x) x->vr_ptr->vr_status diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c index 5d55b5740b2..0a3da2f3919 100644 --- a/sys/dev/pci/if_wb.c +++ b/sys/dev/pci/if_wb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wb.c,v 1.24 2004/09/23 17:45:16 brad Exp $ */ +/* $OpenBSD: if_wb.c,v 1.25 2004/09/28 04:37:33 brad Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1006,7 +1006,7 @@ wb_newbuf(sc, c, m) c->wb_mbuf = m_new; c->wb_ptr->wb_data = vtophys(mtod(m_new, caddr_t)); - c->wb_ptr->wb_ctl = WB_RXCTL_RLINK | 1536; + c->wb_ptr->wb_ctl = WB_RXCTL_RLINK | ETHER_MAX_DIX_LEN; c->wb_ptr->wb_status = WB_RXSTAT; return(0); @@ -1038,7 +1038,7 @@ void wb_rxeof(sc) if ((rxstat & WB_RXSTAT_MIIERR) || (WB_RXBYTES(cur_rx->wb_ptr->wb_status) < WB_MIN_FRAMELEN) || - (WB_RXBYTES(cur_rx->wb_ptr->wb_status) > 1536) || + (WB_RXBYTES(cur_rx->wb_ptr->wb_status) > ETHER_MAX_DIX_LEN) || !(rxstat & WB_RXSTAT_LASTFRAG) || !(rxstat & WB_RXSTAT_RXCMP)) { ifp->if_ierrors++; |