aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2006-09-26 23:14:42 +0000
committerScott Long <scottl@FreeBSD.org>2006-09-26 23:14:42 +0000
commit31e2a87d4d16b038515e512cc2489f3551963ff4 (patch)
treebeb7339852e6246782fa9cf599ace7f93f1958b3
parentde5e5e6ead7a4497b28686b5d3cb8c1c81a8f8b5 (diff)
downloadsrc-31e2a87d4d16b038515e512cc2489f3551963ff4.tar.gz
src-31e2a87d4d16b038515e512cc2489f3551963ff4.zip
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).
Notes
Notes: svn path=/head/; revision=162673
-rw-r--r--sys/i386/i386/busdma_machdep.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/i386/i386/busdma_machdep.c b/sys/i386/i386/busdma_machdep.c
index bfabce942fa9..9cb4b7ea63f4 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);