Date: Fri, 24 Oct 2014 19:18:40 +0000 (UTC) From: Luiz Otavio O Souza <loos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273599 - head/sys/arm/arm Message-ID: <201410241918.s9OJIev4095754@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410241918.s9OJIev4095754>