Module Name: src Committed By: cliff Date: Tue Jan 12 07:58:09 UTC 2010
Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: bus_dma.c Log Message: - in _bus_dmatag_subregion fix comparison of max_addr vs. _BUS_AVAIL_END - in _bus_dmamap_load_buffer use #ifdef BUS_DMA_DEBUG and PRIx formats To generate a diff of this commit: cvs rdiff -u -r1.22.16.11 -r1.22.16.12 src/sys/arch/mips/mips/bus_dma.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mips/mips/bus_dma.c diff -u src/sys/arch/mips/mips/bus_dma.c:1.22.16.11 src/sys/arch/mips/mips/bus_dma.c:1.22.16.12 --- src/sys/arch/mips/mips/bus_dma.c:1.22.16.11 Tue Jan 12 06:38:20 2010 +++ src/sys/arch/mips/mips/bus_dma.c Tue Jan 12 07:58:09 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.22.16.11 2010/01/12 06:38:20 matt Exp $ */ +/* $NetBSD: bus_dma.c,v 1.22.16.12 2010/01/12 07:58:09 cliff Exp $ */ /*- * Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.22.16.11 2010/01/12 06:38:20 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.22.16.12 2010/01/12 07:58:09 cliff Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -133,8 +133,8 @@ (t->_bounce_alloc_hi != 0 && curaddr >= t->_bounce_alloc_hi)) return (EINVAL); -#if 0 - printf("dma: addr 0x%08lx -> 0x%08lx\n", curaddr, +#if BUS_DMA_DEBUG + printf("dma: addr %#"PRIxPADDR" -> %#"PRIxPADDR"\n", curaddr, (curaddr - t->_bounce_alloc_lo) + t->_wbase); #endif curaddr = (curaddr - t->_bounce_alloc_lo) + t->_wbase; @@ -1233,7 +1233,7 @@ #ifdef _MIPS_NEED_BUS_DMA_BOUNCE if ((((tag->_bounce_thresh != 0 && max_addr >= tag->_bounce_thresh) && (tag->_bounce_alloc_hi != 0 && max_addr >= tag->_bounce_alloc_hi)) - || (tag->_bounce_alloc_hi == 0 && max_addr <= _BUS_AVAIL_END)) + || (tag->_bounce_alloc_hi == 0 && max_addr > _BUS_AVAIL_END)) && (min_addr <= tag->_bounce_alloc_lo)) { *newtag = tag; /* if the tag must be freed, add a reference */