summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2007-04-21 12:52:47 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2007-04-21 12:52:47 +0000
commit62e5221885a0d0517db0d554da3a6f886f583d7e (patch)
tree4ec41f462dc21debb2bc00e6b54d97e5d741571e /sys/dev
parent44a3f720d9072945d2faf7d09a4c694ed90858f8 (diff)
when allocating a new mbuf for rx, do a dmamap_sync before handing it to
the hardware. oops.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_vic.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c
index 259f442104f..dd8d58e4098 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.42 2007/04/17 03:55:07 dlg Exp $ */
+/* $OpenBSD: if_vic.c,v 1.43 2007/04/21 12:52:46 dlg Exp $ */
/*
* Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org>
@@ -771,9 +771,13 @@ vic_rx_proc(struct vic_softc *sc)
printf("%s: mbuf alloc failed\n", DEVNAME(sc));
break;
}
+ bus_dmamap_sync(sc->sc_dmat, rxb->rxb_dmamap, 0,
+ rxb->rxb_m->m_pkthdr.len, BUS_DMAMAP_PREREAD);
+
rxd->rx_physaddr = rxb->rxb_dmamap->dm_segs[0].ds_addr;
rxd->rx_buflength = rxb->rxb_m->m_pkthdr.len;
rxd->rx_length = 0;
+ rxd->rx_owner = VIC_OWNER_DRIVER;
ifp->if_ipackets++;