Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm32 Remove complaint: bus_dmamap_destroy() ca...



details:   https://anonhg.NetBSD.org/src/rev/d70ac9794145
branches:  trunk
changeset: 533362:d70ac9794145
user:      briggs <briggs%NetBSD.org@localhost>
date:      Fri Jun 28 15:21:00 2002 +0000

description:
Remove complaint: bus_dmamap_destroy() called for map with valid
mappings bus_dma(9) states: "In the event that the DMA handle contains
a valid mapping, the mapping will be unloaded via the same mechanism
used by bus_dmamap_unload()."  And some drivers do mean to skip the
unload step.

diffstat:

 sys/arch/arm/arm32/bus_dma.c |  14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diffs (28 lines):

diff -r fa6aafbf6e16 -r d70ac9794145 sys/arch/arm/arm32/bus_dma.c
--- a/sys/arch/arm/arm32/bus_dma.c      Fri Jun 28 12:40:10 2002 +0000
+++ b/sys/arch/arm/arm32/bus_dma.c      Fri Jun 28 15:21:00 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_dma.c,v 1.12 2002/06/02 14:44:42 drochner Exp $    */
+/*     $NetBSD: bus_dma.c,v 1.13 2002/06/28 15:21:00 briggs Exp $      */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -128,10 +128,14 @@
 #ifdef DEBUG_DMA
        printf("dmamap_destroy: t=%p map=%p\n", t, map);
 #endif /* DEBUG_DMA */
-#ifdef DIAGNOSTIC
-       if (map->dm_nsegs > 0)
-               printf("bus_dmamap_destroy() called for map with valid mappings\n");
-#endif /* DIAGNOSTIC */
+
+       /*
+        * Explicit unload.
+        */
+       map->dm_mapsize = 0;
+       map->dm_nsegs = 0;
+       map->_dm_proc = NULL;
+
        free(map, M_DEVBUF);
 }
 



Home | Main Index | Thread Index | Old Index