Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic specify dma direction hints for bus_dmamap_load_m...



details:   https://anonhg.NetBSD.org/src/rev/510f4ba5bace
branches:  trunk
changeset: 582928:510f4ba5bace
user:      yamt <yamt%NetBSD.org@localhost>
date:      Mon Jul 11 21:42:58 2005 +0000

description:
specify dma direction hints for bus_dmamap_load_mbuf.

diffstat:

 sys/dev/ic/rtl8169.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 3d924513e5b7 -r 510f4ba5bace sys/dev/ic/rtl8169.c
--- a/sys/dev/ic/rtl8169.c      Mon Jul 11 20:18:52 2005 +0000
+++ b/sys/dev/ic/rtl8169.c      Mon Jul 11 21:42:58 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtl8169.c,v 1.20 2005/05/19 20:11:24 briggs Exp $      */
+/*     $NetBSD: rtl8169.c,v 1.21 2005/07/11 21:42:58 yamt Exp $        */
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -1037,7 +1037,8 @@
        m_adj(m, RTK_ETHER_ALIGN);
 
        map = sc->rtk_ldata.rtk_rx_dmamap[idx];
-       error = bus_dmamap_load_mbuf(sc->sc_dmat, map, m, BUS_DMA_NOWAIT);
+       error = bus_dmamap_load_mbuf(sc->sc_dmat, map, m,
+           BUS_DMA_READ|BUS_DMA_NOWAIT);
 
        if (error)
                goto out;
@@ -1560,7 +1561,8 @@
 
        txq = &sc->rtk_ldata.rtk_txq[*idx];
        map = txq->txq_dmamap;
-       error = bus_dmamap_load_mbuf(sc->sc_dmat, map, m, BUS_DMA_NOWAIT);
+       error = bus_dmamap_load_mbuf(sc->sc_dmat, map, m,
+           BUS_DMA_WRITE|BUS_DMA_NOWAIT);
 
        if (error) {
                /* XXX try to defrag if EFBIG? */



Home | Main Index | Thread Index | Old Index