Subject: Latest "si" driver (disconnect/reselect works!)
To: None <port-sun3@NetBSD.ORG>
From: Gordon W. Ross <gwr@mc.com>
List: port-sun3
Date: 11/19/1995 15:32:09
I've been doing some more work on the NCR5380 (si) driver.
After a nice fellow named Matt Jacob sent me some "tips" I was
able to get disconnect/reselect working on the VME si variant.
Both variants of the si have some really strange "features".
The OBIO si prevents setting the FIFO counter while the SCSI bus
is in any data phase.  The VME si disables interrupts from the
NCR5380 unless the DMA engine is enabled.  (What a mess! 8^)

This code is now in pretty good shape, though there may be a
few more problems to work out related to DMA and interrupts.

Even though the driver is fairly new, it is quite stable when
used in PIO mode, and does a better job with SCSI bus timing
issues than the old driver.  For these reasons, I've switched
the sun3 port over to this new driver for the 1.1 release, but
with the DMA and disconnect/reselect code all disabled for now.

Performance will be poor unless you change this kernel variable:

    si_options = 0	No DMA, no interrupts (default)
    si_options = 1	DMA with polled completion (no interrupts)
    si_options = 3	DMA with interrupt on completion
    si_options = 7	DMA, interrupts, reselects (full features)

I have been running this driver on a 3/60 (OBIO) and 3/260 (VME)
with si_options=7 ("Full speed ahead!") and it's been doing fine.
However, I suspect there may be problems with devices that try to
disconnect before the data phase is finished (i.e. large write to
an old disk with little buffer space on the target controller).
The Sun FIFO logic makes it hard to figure out exactly how much
of any DMA transfer actually completed, due to the order in which
the various hardware components are stopped (and why) after DMA.

I'll put a generic kernel with this driver on ftp.netbsd.org
later this evening.

Gordon