Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jan 2015 02:47:58 +0000 (UTC)
From:      Luiz Otavio O Souza <loos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r276874 - stable/10/sys/arm/arm
Message-ID:  <201501090247.t092lw49063487@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501090247.t092lw49063487>