1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-06 13:09:50 +00:00

Set map->pmap before _bus_dmamap_count_pages() tries to use it.

Obtained from:	Thomas Skibo <ThomasSkibo@sbcglobal.net>
This commit is contained in:
Ian Lepore 2013-02-15 23:41:47 +00:00
parent 74870cdedf
commit 3cbc324925
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=246859

View File

@ -968,6 +968,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat,
if (segs == NULL)
segs = dmat->segments;
map->pmap = pmap;
if ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) {
_bus_dmamap_count_pages(dmat, map, buf, buflen, flags);
if (map->pagesneeded != 0) {
@ -979,7 +981,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat,
sl = NULL;
vaddr = (vm_offset_t)buf;
map->pmap = pmap;
while (buflen > 0) {
/*