svn commit: r276874 - stable/10/sys/arm/arm

Luiz Otavio O Souza loos at FreeBSD.org
Fri Jan 9 02:47:58 UTC 2015


Author: loos
Date: Fri Jan  9 02:47:57 2015
New Revision: 276874
URL: https://svnweb.freebsd.org/changeset/base/276874

Log:
  MFC r273599:
  
  Fix a bug where DMA maps created with bus_dmamap_create() won't increment
  the map count and without being able to keep track of the current map
  allocation, bus_dma_tag_destroy() will fail to proceed and will return
  EBUSY even after all the maps have been correctly destroyed with
  bus_dmamap_destroy().
  
  Found while testing the detach method of a NIC.

Modified:
  stable/10/sys/arm/arm/busdma_machdep-v6.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c
==============================================================================
--- stable/10/sys/arm/arm/busdma_machdep-v6.c	Fri Jan  9 02:43:17 2015	(r276873)
+++ stable/10/sys/arm/arm/busdma_machdep-v6.c	Fri Jan  9 02:47:57 2015	(r276874)
@@ -697,6 +697,8 @@ bus_dmamap_create(bus_dma_tag_t dmat, in
 	if (map->flags & DMAMAP_COHERENT)
 		atomic_add_32(&maps_coherent, 1);
 	atomic_add_32(&maps_total, 1);
+	dmat->map_count++;
+
 	return (0);
 }
 


More information about the svn-src-stable-10 mailing list