From 62e5221885a0d0517db0d554da3a6f886f583d7e Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Sat, 21 Apr 2007 12:52:47 +0000 Subject: when allocating a new mbuf for rx, do a dmamap_sync before handing it to the hardware. oops. --- sys/dev/pci/if_vic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/dev') 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 @@ -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++; -- cgit v1.2.3