Change an instance of curaddr to PHYS_TO_BUS_MEM(t, curaddr) in

_bus_dmamap_load_buffer, otherwise when attempting to DMA a buffer larger
than PAGE_SIZE on an arch where PHYS != BUS it will allways fail.
This commit is contained in:
garbled 2006-10-27 19:36:15 +00:00
parent 0035113cf8
commit 8685914d8f
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: bus_dma.c,v 1.28 2006/09/07 19:13:11 garbled Exp $ */
/* $NetBSD: bus_dma.c,v 1.29 2006/10/27 19:36:15 garbled Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.28 2006/09/07 19:13:11 garbled Exp $");
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.29 2006/10/27 19:36:15 garbled Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -221,7 +221,7 @@ _bus_dmamap_load_buffer(t, map, buf, buflen, vm, flags, lastaddrp, segp, first)
map->dm_maxsegsz &&
(map->_dm_boundary == 0 ||
(map->dm_segs[seg].ds_addr & bmask) ==
(curaddr & bmask)))
(PHYS_TO_BUS_MEM(t, curaddr) & bmask)))
map->dm_segs[seg].ds_len += sgsize;
else {
if (++seg >= map->_dm_segcnt)