Subject: port-powerpc/23801: dma problem
To: None <gnats-bugs@gnats.netbsd.org>
From: None <djg@cerumen.trpz.com>
List: netbsd-bugs
Date: 12/19/2003 08:57:02
>Number: 23801
>Category: port-powerpc
>Synopsis: dma problem
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: port-powerpc-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 19 16:58:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:
>Release: NetBSD 1.6ZD
>Organization:
>Environment:
System: NetBSD cerumen.trpz.com 1.6ZD NetBSD 1.6ZD (NATES) #1: Mon Nov 10 12:58:16 PST 2003 djg@nates.trpz.com:/home/djg/src/NetBSD/usr/src/sys/arch/i386/compile/NATES i386
Architecture: i386
Machine: i386
>Description:
_bus_dmamap_sync() in arch/powerpc/powerpc/bus_dma.c
line 483 of:
/* $NetBSD: bus_dma.c,v 1.17 2003/07/25 10:12:46 scw Exp $ */
uses addr without converting to BUS_MEM. This only affect platforms
that don't map 1:1 (now 405's since last change to current)
>How-To-Repeat:
>Fix:
diff -c ./bus_dma.c /usr/src_current/src/sys/arch/powerpc/powerpc/bus_dma.c
*** ./bus_dma.c Wed Nov 12 13:46:53 2003
--- /usr/src_current/src/sys/arch/powerpc/powerpc/bus_dma.c Fri Jul 25 20:08
:23 2003
***************
*** 480,486 ****
__asm __volatile("eieio");
for (; len > 0; ds++, offset = 0) {
bus_size_t seglen = ds->ds_len - offset;
! bus_addr_t addr = BUS_MEM_TO_PHYS(t, ds->ds_addr) + offset;
if (seglen > len)
seglen = len;
len -= seglen;
--- 480,486 ----
__asm __volatile("eieio");
for (; len > 0; ds++, offset = 0) {
bus_size_t seglen = ds->ds_len - offset;
! bus_addr_t addr = ds->ds_addr + offset;
if (seglen > len)
seglen = len;
len -= seglen;
>Release-Note:
>Audit-Trail:
>Unformatted: