Module Name: src
Committed By: bouyer
Date: Sun Feb 21 14:16:47 UTC 2010
Modified Files:
src/sys/dev/i2o: iop.c
Log Message:
Fix bus_dmamap_sync(): it should be a BUS_DMASYNC_POSTWRITE after
writing to DMA memory.
Found by code inspection.
To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/i2o/iop.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/dev/i2o/iop.c
diff -u src/sys/dev/i2o/iop.c:1.78 src/sys/dev/i2o/iop.c:1.79
--- src/sys/dev/i2o/iop.c:1.78 Fri Feb 19 12:36:15 2010
+++ src/sys/dev/i2o/iop.c Sun Feb 21 14:16:47 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: iop.c,v 1.78 2010/02/19 12:36:15 asau Exp $ */
+/* $NetBSD: iop.c,v 1.79 2010/02/21 14:16:47 bouyer Exp $ */
/*-
* Copyright (c) 2000, 2001, 2002, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.78 2010/02/19 12:36:15 asau Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.79 2010/02/21 14:16:47 bouyer Exp $");
#include "iop.h"
@@ -1538,7 +1538,7 @@
BUS_DMASYNC_PREWRITE);
*sw = htole32(0);
bus_dmamap_sync(sc->sc_dmat, sc->sc_scr_dmamap, 0, sizeof(*sw),
- BUS_DMASYNC_PREWRITE|BUS_DMASYNC_PREREAD);
+ BUS_DMASYNC_POSTWRITE);
if ((rv = iop_post(sc, (u_int32_t *)&mf)))
return (rv);