Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/x86 After bouncing in bus_dmamap_load{, _mbuf, _u...



details:   https://anonhg.NetBSD.org/src/rev/8fc500137cdb
branches:  trunk
changeset: 769961:8fc500137cdb
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Wed Sep 28 01:38:19 2011 +0000

description:
After bouncing in bus_dmamap_load{,_mbuf,_uio}, call bus_dmamap_load(9)
instead of _bus_dmamap_load() so that a bus_dmamap_load(9) override has
a shot at loading the map.

XXX Perhaps bounce buffers should be rewritten in terms of bus_dma(9)
XXX overrides.

diffstat:

 sys/arch/x86/x86/bus_dma.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r f00f5ce84dad -r 8fc500137cdb sys/arch/x86/x86/bus_dma.c
--- a/sys/arch/x86/x86/bus_dma.c        Wed Sep 28 01:35:58 2011 +0000
+++ b/sys/arch/x86/x86/bus_dma.c        Wed Sep 28 01:38:19 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_dma.c,v 1.65 2011/09/28 01:35:58 dyoung Exp $      */
+/*     $NetBSD: bus_dma.c,v 1.66 2011/09/28 01:38:19 dyoung Exp $      */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2007 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.65 2011/09/28 01:35:58 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.66 2011/09/28 01:38:19 dyoung Exp $");
 
 /*
  * The following is included because _bus_dma_uiomove is derived from
@@ -424,7 +424,7 @@
        cookie->id_origbuflen = buflen;
        cookie->id_buftype = X86_DMA_BUFTYPE_LINEAR;
        map->dm_nsegs = 0;
-       error = _bus_dmamap_load(t, map, cookie->id_bouncebuf, buflen,
+       error = bus_dmamap_load(t, map, cookie->id_bouncebuf, buflen,
            p, flags);
        if (error)
                return (error);
@@ -620,7 +620,7 @@
        cookie->id_origbuf = m0;
        cookie->id_origbuflen = m0->m_pkthdr.len;       /* not really used */
        cookie->id_buftype = X86_DMA_BUFTYPE_MBUF;
-       error = _bus_dmamap_load(t, map, cookie->id_bouncebuf,
+       error = bus_dmamap_load(t, map, cookie->id_bouncebuf,
            m0->m_pkthdr.len, NULL, flags);
        if (error)
                return (error);
@@ -700,7 +700,7 @@
        cookie->id_origbuf = uio;
        cookie->id_origbuflen = uio->uio_resid;
        cookie->id_buftype = X86_DMA_BUFTYPE_UIO;
-       error = _bus_dmamap_load(t, map, cookie->id_bouncebuf,
+       error = bus_dmamap_load(t, map, cookie->id_bouncebuf,
            uio->uio_resid, NULL, flags);
        if (error)
                return (error);



Home | Main Index | Thread Index | Old Index