diff options
author | scottl <scottl@FreeBSD.org> | 2006-09-26 23:14:42 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2006-09-26 23:14:42 +0000 |
commit | e502090edb1afbf157ab5a195f23b62ac65279e1 (patch) | |
tree | beb7339852e6246782fa9cf599ace7f93f1958b3 /sys | |
parent | f4747864d3fe02476c8e0067a8981d3bdbb95801 (diff) | |
download | FreeBSD-src-e502090edb1afbf157ab5a195f23b62ac65279e1.zip FreeBSD-src-e502090edb1afbf157ab5a195f23b62ac65279e1.tar.gz |
The need to run a filter also implies that bouncing could be possible, so
just use the COULD_BOUNCE flag for both and retire the USE_FILTER flag.
This fixes the problem that rev 1.81 introduced with the if_bfe driver
(and possibly others).
Diffstat (limited to 'sys')
-rw-r--r-- | sys/i386/i386/busdma_machdep.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/i386/i386/busdma_machdep.c b/sys/i386/i386/busdma_machdep.c index bfabce9..9cb4b7e 100644 --- a/sys/i386/i386/busdma_machdep.c +++ b/sys/i386/i386/busdma_machdep.c @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include <machine/md_var.h> #define MAX_BPAGES 512 -#define BUS_DMA_USE_FILTER BUS_DMA_BUS2 #define BUS_DMA_COULD_BOUNCE BUS_DMA_BUS3 #define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 @@ -269,8 +268,8 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, newtag->boundary = MIN(parent->boundary, newtag->boundary); if ((newtag->filter != NULL) || - ((parent->flags & BUS_DMA_USE_FILTER) != 0)) - newtag->flags |= BUS_DMA_USE_FILTER; + ((parent->flags & BUS_DMA_COULD_BOUNCE) != 0)) + newtag->flags |= BUS_DMA_COULD_BOUNCE; if (newtag->filter == NULL) { /* * Short circuit looking at our parent directly @@ -583,7 +582,7 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, while (vaddr < vendaddr) { paddr = pmap_kextract(vaddr); - if (((dmat->flags & BUS_DMA_USE_FILTER) != 0) && + if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) && run_filter(dmat, paddr) != 0) { needbounce = 1; map->pagesneeded++; @@ -682,7 +681,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, sgsize = (baddr - curaddr); } - if (((dmat->flags & BUS_DMA_USE_FILTER) != 0) && + if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) && map->pagesneeded != 0 && run_filter(dmat, curaddr)) curaddr = add_bounce_page(dmat, map, vaddr, sgsize); |