Date: Thu, 9 Mar 2006 21:34:40 GMT From: Olivier Houchard <cognet@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 93064 for review Message-ID: <200603092134.k29LYeEv034206@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=93064 Change 93064 by cognet@cognet on 2006/03/09 21:33:46 Call bus_dmamap_sync on the rx descriptors map after we modified it, to be sure the adapter sees the new values. Affected files ... .. //depot/projects/arm/src/sys/arm/at91/if_ate.c#30 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/if_ate.c#30 (text+ko) ==== @@ -608,9 +608,11 @@ if (i == ATE_MAX_RX_BUFFERS - 1) sc->rx_descs[i].addr |= ETH_WRAP_BIT; - bus_dmamap_sync(sc->rxtag, sc->rx_map[i], - BUS_DMASYNC_PREREAD); - bus_dmamap_sync(sc->rxtag, sc->rx_map[i], + bus_dmamap_sync(sc->rx_desc_tag, + sc->rx_desc_map, + BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->rxtag, + sc->rx_map[i], BUS_DMASYNC_PREWRITE); continue; } @@ -627,10 +629,9 @@ printf("Failed to get another mbuf -- discarding packet\n"); sc->rx_mbuf[i] = mb; sc->rx_descs[i].addr &= ~ETH_CPU_OWNER; - bus_dmamap_sync(sc->rxtag, sc->rx_map[i], - BUS_DMASYNC_PREREAD); - bus_dmamap_sync(sc->rxtag, sc->rx_map[i], - BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->rx_desc_tag, + sc->rx_desc_map, + BUS_DMASYNC_PREWRITE); continue; } bus_dmamap_unload(sc->rxtag, sc->rx_map[i]); @@ -640,10 +641,9 @@ printf("Failed to load mbuf -- discarding packet -- reload old?\n"); sc->rx_mbuf[i] = mb; sc->rx_descs[i].addr &= ~ETH_CPU_OWNER; - bus_dmamap_sync(sc->rxtag, sc->rx_map[i], - BUS_DMASYNC_PREREAD); - bus_dmamap_sync(sc->rxtag, sc->rx_map[i], - BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->rx_desc_tag, + sc->rx_desc_map, + BUS_DMASYNC_PREWRITE); continue; } mb->m_len = rx_stat & ETH_LEN_MASK; @@ -658,9 +658,9 @@ sc->rx_descs[i].addr = seg.ds_addr; if (i == ATE_MAX_RX_BUFFERS - 1) sc->rx_descs[i].addr |= ETH_WRAP_BIT; - else - bus_dmamap_sync(sc->rxtag, sc->rx_map[i], - BUS_DMASYNC_PREREAD); + bus_dmamap_sync(sc->rx_desc_tag, + sc->rx_desc_map, + BUS_DMASYNC_PREWRITE); bus_dmamap_sync(sc->rxtag, sc->rx_map[i], BUS_DMASYNC_PREWRITE); (*sc->ifp->if_input)(sc->ifp, mb);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603092134.k29LYeEv034206>