Subject: dej's ncr_si and ie0, followup...
To: None <port-sparc@NetBSD.ORG>
From: Jason Thorpe <thorpej@SJ.Xenotropic.COM>
List: port-sparc
Date: 12/05/1995 00:58:05
Some may remember that a few weeks ago I posted that I was having problems
with my port of dej's ncr_si driver and the obio ie; DMA underrun on the
ie, which confused the hell out of my hp380 (one of my primary NFS servers)
as well.

So, I was looking though the source some more and noticed a dvma_malloc()
I must have overlooked before.

To explain, the sun3 obio si uses an AMD UDC to deal with the DMA.  Command
blocks for the UDC must be in DVMA-capable memory.  The software construct
"dma_handle" is used thoughout the driver, and in the sun3 version, UDC
command blocks are grouped in with the "dma_handle" structure.  This means
that a dvma_malloc() is required when allocating space for the "dma_handles".

However, to my knowledge, the sun4 doesn't have an AMD UDC.  Therefore, the
dvma_malloc() can be replaced with a call to the standard malloc() instead.

Using dvma_malloc() was basically wasting precious DVMA space on the sun4,
and thus causing resource contention with the ie.

Gordon, I've CC'd you on this because I'd suggest changing the sun3 version
of the driver to only allocate space for "dma_handles" in DVMA space if the
bustype is obio, since the si VME board on the sun3 doesn't even use the
UDC command blocks and thus doesn't have that icky restriction.  I think
I remember David mentioning DMA underruns on his 3/260?

To cut to the chase, I tested my theory by rebooting my mvme147, for
which my 4/260 is the root/swap/usr/whatever fileserver.  That used to
result in several screenfulls of "ie0: DMA underrun".  The reboot
and a "find / > /dev/null" resulted in a sum total of 7 messages.  I'd
call that a significant improvement.  Maybe we should go on a resource
contention witchhunt :-)

Anyhow, I'm going to try and have another tarball with my ncr_si port
pretty soon so that others can give this a whirl.  I'll build a
GENERIC kernel if necessary, too.

Ciao.

------------------------------------------------------------------------------
Jason R. Thorpe                                         thorpej@Xenotropic.COM

           Just me and my collection of obsolete computer gear(s).