In _bus_dmamap_load_buffer(), only count the number of bounce pages needed if

they haven't been counted before.  This test was ommitted when bus_dmamap_load()
was merged into this function, and results in the pagesneeded field growing
without bounds when multiple deferrals happen.

Thanks to Paul Saab for beating his head against this for a few hours =-)
This commit is contained in:
Scott Long 2003-08-04 23:40:35 +00:00
parent 02cc6a6f35
commit 477327b5c5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118451
2 changed files with 4 additions and 2 deletions

View File

@ -476,7 +476,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat,
else
pmap = NULL;
if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem)) {
if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem) &&
map->pagesneeded == 0) {
vm_offset_t vendaddr;
/*

View File

@ -494,7 +494,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat,
else
pmap = NULL;
if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem)) {
if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem) &&
map->pagesneeded == 0) {
vm_offset_t vendaddr;
/*