Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x68k/dev Do not memcpy to the bouncebuffer in datain.



details:   https://anonhg.NetBSD.org/src/rev/ba6cb485e660
branches:  trunk
changeset: 472010:ba6cb485e660
user:      minoura <minoura%NetBSD.org@localhost>
date:      Sun Apr 18 00:38:58 1999 +0000

description:
Do not memcpy to the bouncebuffer in datain.

diffstat:

 sys/arch/x68k/dev/mha.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (26 lines):

diff -r 1b535486ba38 -r ba6cb485e660 sys/arch/x68k/dev/mha.c
--- a/sys/arch/x68k/dev/mha.c   Sun Apr 18 00:36:36 1999 +0000
+++ b/sys/arch/x68k/dev/mha.c   Sun Apr 18 00:38:58 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mha.c,v 1.15 1999/03/24 14:07:38 minoura Exp $ */
+/*     $NetBSD: mha.c,v 1.16 1999/04/18 00:38:58 minoura Exp $ */
 
 /*-
  * Copyright (c) 1996-1999 The NetBSD Foundation, Inc.
@@ -1687,10 +1687,12 @@
   if (sc->sc_dmasize > 0)
     panic("DMA request while another DMA transfer is in pregress");
 
-  memcpy(sc->sc_dmabuf, p, n);
-  bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, 0, n,
-                 (cw == CMD_SEND_FROM_DMA)?BUS_DMASYNC_PREWRITE
-                                          :BUS_DMASYNC_PREREAD);
+  if (cw == CMD_SEND_FROM_DMA) {
+    memcpy(sc->sc_dmabuf, p, n);
+    bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, 0, n, BUS_DMASYNC_PREWRITE);
+  } else {
+    bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, 0, n, BUS_DMASYNC_PREREAD);
+  }
   sc->sc_p = p;
   sc->sc_dmasize = n;
 



Home | Main Index | Thread Index | Old Index