svn commit: r273599 - head/sys/arm/arm

Luiz Otavio O Souza loos at FreeBSD.org
Fri Oct 24 19:18:40 UTC 2014


Author: loos
Date: Fri Oct 24 19:18:39 2014
New Revision: 273599
URL: https://svnweb.freebsd.org/changeset/base/273599

Log:
  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.
  
  Tested on:	BBB (am335x)
  Reviewed by:	cognet, ian
  MFC after:	1 week

Modified:
  head/sys/arm/arm/busdma_machdep-v6.c

Modified: head/sys/arm/arm/busdma_machdep-v6.c
==============================================================================
--- head/sys/arm/arm/busdma_machdep-v6.c	Fri Oct 24 18:39:15 2014	(r273598)
+++ head/sys/arm/arm/busdma_machdep-v6.c	Fri Oct 24 19:18:39 2014	(r273599)
@@ -719,6 +719,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-head mailing list