Date: Fri, 3 Nov 2000 05:59:38 -0500 (EST) From: cgull@owl.org To: FreeBSD-gnats-submit@freebsd.org Cc: nsouch@freebsd.org, nicolas.souchu@prism.uvsq.fr, dfr@freebsd.org Subject: i386/22568: ppc panic with drq = 0 Message-ID: <200011031059.eA3AxcK00563@n.owl.org>
next in thread | raw e-mail | index | archive | help
>Number:         22568
>Category:       i386
>Synopsis:       ppc0 panics on DMA with drq set to 0
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 03 03:00:02 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     john hood
>Release:        FreeBSD 4.1-20001028-STABLE i386
>Organization:
>Environment:
Asus A7V motherboard with super i/o's parallel port configured to port
0x378, irq 7, dma 3.  kernel config derived from GENERIC; ppb and lpt
configuration identical to GENERIC.
>Description:
The ppc driver panics when requested to use DMA, when it is configured
to use DMA channel 0.
>How-To-Repeat:
	boot kernel.GENERIC
	lptcontrol -e
	dd if=/dev/zero of=/dev/lpt0 bs=1024 count=1
	panic: isa_dmastart: bad bounce buffer
	boot kernel.GENERIC -c; drq ppc0 3
	lptcontrol -e
	dd if=/dev/zero of=/dev/lpt0 bs=1024 count=1
	no panic.
>Fix:
Make ppc.c test ppc->ppc_dmachan consistently.  I think drq 0 means
'unconfigured', so I did that.
A quick grovel through cvsweb shows the bug's existed since DMA
support was added.
--- ppc.c	Fri Nov  3 05:06:31 2000
+++ /usr/src/sys/isa/ppc.c	Sat Jul 22 05:09:36 2000
@@ -1657,7 +1657,7 @@
 	 */
 	if ((ppc->ppc_avm & PPB_ECP) && (ppc->ppc_registered)) {
 
-	    if (ppc->ppc_dmachan > 0) {
+	    if (ppc->ppc_dmachan >= 0) {
 
 		/* byte mode, no intr, no DMA, dir=0, flush fifo
 		 */
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011031059.eA3AxcK00563>
