svn commit: r233675 - head/sys/x86/isa
John Baldwin
jhb at FreeBSD.org
Thu Mar 29 18:58:03 UTC 2012
Author: jhb
Date: Thu Mar 29 18:58:02 2012
New Revision: 233675
URL: http://svn.freebsd.org/changeset/base/233675
Log:
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
Modified:
head/sys/x86/isa/isa_dma.c
Modified: head/sys/x86/isa/isa_dma.c
==============================================================================
--- head/sys/x86/isa/isa_dma.c Thu Mar 29 17:50:01 2012 (r233674)
+++ head/sys/x86/isa/isa_dma.c Thu Mar 29 18:58:02 2012 (r233675)
@@ -237,8 +237,6 @@ isa_dmastart(int flags, caddr_t addr, u_
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_
addr = newaddr;
}
+ /* translate to physical */
+ phys = pmap_extract(kernel_pmap, (vm_offset_t)addr);
+
if (flags & ISADMA_RAW) {
dma_auto_mode |= (1 << chan);
} else {
More information about the svn-src-all
mailing list