From 449abfd1cae84d644c099f6c5514781657922b58 Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Tue, 31 Oct 2006 07:01:09 +0000 Subject: we're passing physical addresses to the adapter, so say so. add some magic that lets me see packets coming out of the box. --- sys/dev/pci/if_vic.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/dev') 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 @@ -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); } -- cgit v1.2.3