summaryrefslogtreecommitdiffstats
path: root/sys/x86/isa
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2012-03-29 18:58:02 +0000
committerjhb <jhb@FreeBSD.org>2012-03-29 18:58:02 +0000
commit38fb55f1d4d3789de9a985973acad5091a0e222e (patch)
tree0f31e089df09cb3ba485c90584b50388f6d54cc0 /sys/x86/isa
parentff300c96d0e017746625b9b455b97b00f3997d75 (diff)
downloadFreeBSD-src-38fb55f1d4d3789de9a985973acad5091a0e222e.zip
FreeBSD-src-38fb55f1d4d3789de9a985973acad5091a0e222e.tar.gz
Restore proper use of bounce buffers for ISA DMA. When locking was
added, the call to pmap_kextract() was moved up, and as a result the code never updated the physical address to use for DMA if a bounce buffer was used. Restore the earlier location of pmap_kextract() so it takes bounce buffers into account. Tested by: kargl MFC after: 1 week
Diffstat (limited to 'sys/x86/isa')
-rw-r--r--sys/x86/isa/isa_dma.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/x86/isa/isa_dma.c b/sys/x86/isa/isa_dma.c
index cbc9959..90ee14d 100644
--- a/sys/x86/isa/isa_dma.c
+++ b/sys/x86/isa/isa_dma.c
@@ -237,8 +237,6 @@ isa_dmastart(int flags, caddr_t addr, u_int nbytes, int chan)
caddr_t newaddr;
int dma_range_checked;
- /* translate to physical */
- phys = pmap_extract(kernel_pmap, (vm_offset_t)addr);
dma_range_checked = isa_dmarangecheck(addr, nbytes, chan);
#ifdef DIAGNOSTIC
@@ -281,6 +279,9 @@ isa_dmastart(int flags, caddr_t addr, u_int nbytes, int chan)
addr = newaddr;
}
+ /* translate to physical */
+ phys = pmap_extract(kernel_pmap, (vm_offset_t)addr);
+
if (flags & ISADMA_RAW) {
dma_auto_mode |= (1 << chan);
} else {
OpenPOWER on IntegriCloud