summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
authorloos <loos@FreeBSD.org>2015-01-09 02:47:57 +0000
committerloos <loos@FreeBSD.org>2015-01-09 02:47:57 +0000
commit5eabc7cb6715f72586fc872eab489990b50686a3 (patch)
treeaa23b6512787687ecb9cb853a26c2776c34ca8e4 /sys/arm
parent544e0536f8812fa76e463d665fcc4fa9f25680df (diff)
downloadFreeBSD-src-5eabc7cb6715f72586fc872eab489990b50686a3.zip
FreeBSD-src-5eabc7cb6715f72586fc872eab489990b50686a3.tar.gz
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.
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/arm/busdma_machdep-v6.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/arm/arm/busdma_machdep-v6.c b/sys/arm/arm/busdma_machdep-v6.c
index 9a2a742..39014a4 100644
--- a/sys/arm/arm/busdma_machdep-v6.c
+++ b/sys/arm/arm/busdma_machdep-v6.c
@@ -697,6 +697,8 @@ bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp)
if (map->flags & DMAMAP_COHERENT)
atomic_add_32(&maps_coherent, 1);
atomic_add_32(&maps_total, 1);
+ dmat->map_count++;
+
return (0);
}
OpenPOWER on IntegriCloud