Subject: VS3100 SCSI oddities
To: David Evans <dfevans@bbcr.uwaterloo.ca>
From: Bertram Barth <bertram@ifib.uni-karlsruhe.de>
List: port-vax
Date: 02/04/1998 09:12:47
David Evans writes:
>   This is strange.  Until today I was MOPing my VS3100/M30, grabbing the
> kernel (1.3 GENERIC) via NFS, and then chugging along with local filesystems
> (root on sd0a, swap on sd0b, /usr on sd0e).  Worked fine.  I finally got
> around to installing xxboot; I can now load the kernel using the rom()gennetbsd
> syntax and the machine boots single-user no problem.  However, when I try to
> go multiuser I get tonnes of
> 
> DMA incomplete: ntrans=3073/3072, lock=98
> si_dma_stop: timeout?
> DMA incomplete: ntrans=3073/3072, lock=98
> si_dma_stop: timeout?
> 
> ...and so on.  Now I'm well aware of the brokenness of the current DMA code but
> why does it work fine when I load the kernel over NFS?

First a short explanation for the DMA messages you see:
When doing DMA there's a register for the DMA-counter which gets
initialized with the number of bytes to transfer. Among other
incompatibilities between 2000 and 3100/76 there's some "off-by-one"
difference in these counters. I can't remember exactly (there was a
lot of trial-and-error) but somehow I found a "solution" which seemed
to work for 2000 and 3100/76. Your 3100/30 seems to suffer from the
same (or a different) "off-by-one" problem in the DMA-counter. AFAIK
all 3100 either use the 2000 variant for DMA-counter or the 3100/76
variant. It might help to use the other variant of DMA-counter 
initialization... [Anyway, this is no real solution, look at "PS:"]

Now for your question: I don't know the answer.  ;-/
Another "strange" detail which happened to me and which looks in some
way related to what you get: In my 3100/76 I had two disks, one per SCSI
controller. IIRC I got lots of the above messages when accessing the
external drive, when accessing the internal (boot-) drive it behaved
rather normal. Since the driver is the same, the only explanation I have
is that this might be somehow related to the initialization by ROM routines
during the boot process (or with some flakeyness in the driver).

Cioa,
	bertram

PS: As somebody else correctly stated on the list, intimate knowledge
    and understanding of the underlying hardware is neccessary when
    writing a driver. I don't have this knowledge and I'd really like
    to see somebody with this knowledge (or at least more than I have)
    fixing or rewriting the SCSI driver for 2000/3100...