summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2006-10-31 07:01:09 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2006-10-31 07:01:09 +0000
commit449abfd1cae84d644c099f6c5514781657922b58 (patch)
tree4211f2ce3dd5d3a3329e5e464a040fa400224289 /sys/dev/pci
parentba7e629591af976a740a12acbeb0a0fa61d92e34 (diff)
we're passing physical addresses to the adapter, so say so. add some magic
that lets me see packets coming out of the box.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_vic.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c
index 18719bab8ff..5e7149cb8d6 100644
--- a/sys/dev/pci/if_vic.c
+++ b/sys/dev/pci/if_vic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vic.c,v 1.10 2006/10/31 06:04:15 dlg Exp $ */
+/* $OpenBSD: if_vic.c,v 1.11 2006/10/31 07:01:08 dlg Exp $ */
/*
* Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org>
@@ -810,8 +810,10 @@ vic_encap(struct vic_softc *sc, struct mbuf *m)
/* XXX nsegs are cool */
txd->tx_flags = VIC_TX_FLAGS_KEEP;
+ txd->tx_sa.sa_addr_type = VIC_SG_ADDR_PHYS;
txd->tx_sa.sa_length = 1;
txd->tx_sa.sa_sg[0].sg_length = m->m_len;
+ txd->tx_sa.sa_sg[0].sg_addr_low = 0;
txd->tx_sa.sa_sg[0].sg_addr_low = txb->txb_dmamap->dm_segs[0].ds_addr;
txd->tx_owner = VIC_OWNER_NIC;
@@ -827,11 +829,14 @@ vic_encap(struct vic_softc *sc, struct mbuf *m)
ifp->if_opackets++;
sc->sc_txpending++;
+ sc->sc_data->vd_tx_stopped = 1;
VIC_INC(sc->sc_data->vd_tx_nextidx, sc->sc_data->vd_tx_length);
bus_dmamap_sync(sc->sc_dmat, sc->sc_dma_map, 0, sc->sc_dma_size,
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
+ vic_read(sc, VIC_Tx_ADDR);
+
return (0);
}