Module Name:    src
Committed By:   matt
Date:           Thu Feb 14 01:12:39 UTC 2013

Modified Files:
        src/sys/arch/arm/arm32: bus_dma.c

Log Message:
fix writebuf draining fix.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/arm/arm32/bus_dma.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/arm32/bus_dma.c
diff -u src/sys/arch/arm/arm32/bus_dma.c:1.74 src/sys/arch/arm/arm32/bus_dma.c:1.75
--- src/sys/arch/arm/arm32/bus_dma.c:1.74	Wed Feb 13 23:08:45 2013
+++ src/sys/arch/arm/arm32/bus_dma.c	Thu Feb 14 01:12:39 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.74 2013/02/13 23:08:45 matt Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.75 2013/02/14 01:12:39 matt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #define _ARM32_BUS_DMA_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.74 2013/02/13 23:08:45 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.75 2013/02/14 01:12:39 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1016,10 +1016,10 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm
 #endif /* _ARM32_NEED_BUS_DMA_BOUNCE */
 
 	/* Skip cache frobbing if mapping was COHERENT. */
-	if (!bouncing && pre_ops == 0
-	    && (map->_dm_flags & _BUS_DMAMAP_COHERENT)) {
+	if (!bouncing && (map->_dm_flags & _BUS_DMAMAP_COHERENT)) {
 		/* Drain the write buffer. */
-		cpu_drain_writebuf();
+		if (pre_ops & BUS_DMASYNC_PREWRITE)
+			cpu_drain_writebuf();
 		return;
 	}
 

Reply via email to