diff options
author | scottl <scottl@FreeBSD.org> | 2006-10-14 03:58:59 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2006-10-14 03:58:59 +0000 |
commit | 5cccc781cc1b1d06014b63104ebd8c816d4382a5 (patch) | |
tree | 247613ddc0dd754f71ba0b989fcaa88b904b8acc /sys/dev/bce | |
parent | aa695ee90e413c29b525a403642774bfdce9313e (diff) | |
download | FreeBSD-src-5cccc781cc1b1d06014b63104ebd8c816d4382a5.zip FreeBSD-src-5cccc781cc1b1d06014b63104ebd8c816d4382a5.tar.gz |
Don't copy the bd_chain head pointers into temporary objects, they are
available globally.
Diffstat (limited to 'sys/dev/bce')
-rw-r--r-- | sys/dev/bce/if_bce.c | 9 | ||||
-rw-r--r-- | sys/dev/bce/if_bcereg.h | 1 |
2 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c index d2d81a3..ac141ac 100644 --- a/sys/dev/bce/if_bce.c +++ b/sys/dev/bce/if_bce.c @@ -2220,7 +2220,7 @@ bce_dma_map_tx_desc(void *arg, bus_dma_segment_t *segs, * the mbuf. */ - txbd = &map_arg->tx_chain[TX_PAGE(chain_prod)][TX_IDX(chain_prod)]; + txbd = &sc->tx_bd_chain[TX_PAGE(chain_prod)][TX_IDX(chain_prod)]; /* Setup the first tx_bd for the first segment. */ txbd->tx_bd_haddr_lo = htole32(BCE_ADDR_LO(segs[i].ds_addr)); @@ -2235,7 +2235,7 @@ bce_dma_map_tx_desc(void *arg, bus_dma_segment_t *segs, prod = NEXT_TX_BD(prod); chain_prod = TX_CHAIN_IDX(prod); - txbd = &map_arg->tx_chain[TX_PAGE(chain_prod)][TX_IDX(chain_prod)]; + txbd = &sc->tx_bd_chain[TX_PAGE(chain_prod)][TX_IDX(chain_prod)]; txbd->tx_bd_haddr_lo = htole32(BCE_ADDR_LO(segs[i].ds_addr)); txbd->tx_bd_haddr_hi = htole32(BCE_ADDR_HI(segs[i].ds_addr)); @@ -4645,7 +4645,7 @@ bce_tx_encap(struct bce_softc *sc, struct mbuf *m_head, u16 *prod, u32 vlan_tag_flags = 0; struct bce_dmamap_arg map_arg; bus_dmamap_t map; - int i, error, rc = 0; + int error, rc = 0; /* Transfer any checksum offload flags to the bd. */ if (m_head->m_pkthdr.csum_flags) { @@ -4672,9 +4672,6 @@ bce_tx_encap(struct bce_softc *sc, struct mbuf *m_head, u16 *prod, KASSERT(map_arg.maxsegs > 0, ("Invalid TX maxsegs value!")); - for (i = 0; i < TX_PAGES; i++) - map_arg.tx_chain[i] = sc->tx_bd_chain[i]; - /* Map the mbuf into our DMA address space. */ error = bus_dmamap_load_mbuf(sc->tx_mbuf_tag, map, m_head, bce_dma_map_tx_desc, &map_arg, BUS_DMA_NOWAIT); diff --git a/sys/dev/bce/if_bcereg.h b/sys/dev/bce/if_bcereg.h index 1638179..631321d 100644 --- a/sys/dev/bce/if_bcereg.h +++ b/sys/dev/bce/if_bcereg.h @@ -4658,7 +4658,6 @@ struct bce_dmamap_arg { u16 chain_prod; int maxsegs; /* Max segments supported for this mapped memory */ u32 prod_bseq; - struct tx_bd *tx_chain[TX_PAGES]; }; |