diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2016-11-16 02:50:18 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2016-11-16 02:50:18 +0000 |
commit | e3379d4c89920c301d6f686f57cb145aaa227c31 (patch) | |
tree | 2b9b26024e4121ca04285a964fca868d3a4f9af0 /sys | |
parent | f9460dde7ef76729646024d96bee4c0938a6d958 (diff) |
allocate dmamaps for every descriptor in the tx ring.
previously there was a limit of 64 packets on the tx ring. soon we
will use as many descriptors as we want to fill the ring.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/re.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index 509855a026a..ee9d02657b9 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.196 2016/11/16 01:55:10 dlg Exp $ */ +/* $OpenBSD: re.c,v 1.197 2016/11/16 02:50:17 dlg Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -937,7 +937,7 @@ re_attach(struct rl_softc *sc, const char *intrstr) } /* Create DMA maps for TX buffers */ - for (i = 0; i < RL_TX_QLEN; i++) { + for (i = 0; i < sc->rl_ldata.rl_tx_desc_cnt; i++) { error = bus_dmamap_create(sc->sc_dmat, RL_JUMBO_FRAMELEN, sc->rl_ldata.rl_tx_ndescs, RL_JUMBO_FRAMELEN, 0, 0, @@ -1096,7 +1096,7 @@ fail_5: fail_4: /* Destroy DMA maps for TX buffers. */ - for (i = 0; i < RL_TX_QLEN; i++) { + for (i = 0; i < sc->rl_ldata.rl_tx_desc_cnt; i++) { if (sc->rl_ldata.rl_txq[i].txq_dmamap != NULL) bus_dmamap_destroy(sc->sc_dmat, sc->rl_ldata.rl_txq[i].txq_dmamap); @@ -1188,7 +1188,7 @@ re_tx_list_init(struct rl_softc *sc) int i; memset(sc->rl_ldata.rl_tx_list, 0, RL_TX_LIST_SZ(sc)); - for (i = 0; i < RL_TX_QLEN; i++) { + for (i = 0; i < sc->rl_ldata.rl_tx_desc_cnt; i++) { sc->rl_ldata.rl_txq[i].txq_mbuf = NULL; } @@ -2178,7 +2178,7 @@ re_stop(struct ifnet *ifp) } /* Free the TX list buffers. */ - for (i = 0; i < RL_TX_QLEN; i++) { + for (i = 0; i < sc->rl_ldata.rl_tx_desc_cnt; i++) { if (sc->rl_ldata.rl_txq[i].txq_mbuf != NULL) { bus_dmamap_unload(sc->sc_dmat, sc->rl_ldata.rl_txq[i].txq_dmamap); |