diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-11-25 11:45:15 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-11-25 11:45:15 +0000 |
commit | 8ab20164cc14e36fbb0eaf9938b8af63a160f762 (patch) | |
tree | af7ff40fd601011efa3931fa5b9a60cead3e9923 /sys/dev/pci/if_et.c | |
parent | 81c82f0a9fedfa5bda0780e86db5a95a644b83dc (diff) |
Correctly setup the tx descriptor by using the right mapping infos.
This makes et(4) work and as ususal this is commited over et(4) to prove
that it is usuable. with and ok jsg@
Diffstat (limited to 'sys/dev/pci/if_et.c')
-rw-r--r-- | sys/dev/pci/if_et.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/if_et.c b/sys/dev/pci/if_et.c index ac52d5e57ef..1a9eb0ff8c7 100644 --- a/sys/dev/pci/if_et.c +++ b/sys/dev/pci/if_et.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_et.c,v 1.1 2007/10/30 12:31:07 jsg Exp $ */ +/* $OpenBSD: if_et.c,v 1.2 2007/11/25 11:45:14 claudio Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. * @@ -1813,7 +1813,6 @@ int et_encap(struct et_softc *sc, struct mbuf **m0) { struct mbuf *m = *m0; - bus_dma_segment_t segs[ET_NSEG_MAX]; struct et_txdesc_ring *tx_ring = &sc->sc_tx_ring; struct et_txbuf_data *tbd = &sc->sc_tx_data; struct et_txdesc *td; @@ -1905,9 +1904,10 @@ et_encap(struct et_softc *sc, struct mbuf **m0) idx = (first_idx + i) % ET_TX_NDESC; td = &tx_ring->tr_desc[idx]; - td->td_addr_hi = ET_ADDR_HI(segs[i].ds_addr); - td->td_addr_lo = ET_ADDR_LO(segs[i].ds_addr); - td->td_ctrl1 = __SHIFTIN(segs[i].ds_len, ET_TDCTRL1_LEN); + td->td_addr_hi = ET_ADDR_HI(map->dm_segs[i].ds_addr); + td->td_addr_lo = ET_ADDR_LO(map->dm_segs[i].ds_addr); + td->td_ctrl1 = + __SHIFTIN(map->dm_segs[i].ds_len, ET_TDCTRL1_LEN); if (i == map->dm_nsegs - 1) { /* Last frag */ td->td_ctrl2 = last_td_ctrl2; |