Subject: scsi status update
To: None <port-next68k@NetBSD.ORG>
From: Darrin B. Jewell <dbj@NetBSD.ORG>
List: port-next68k
Date: 07/21/1998 02:22:19
I had a few hours this weekend to work on the SCSI driver, so I
thought I'd let the list know what I've been up to since things have
been a little quiet.  I think I've got a handle on most of the quirks
in the ncr53c90a scsi on the next, and have written much of the glue
between the nextdma driver and the netbsd machine independant (MI)
ncr53c9x driver.  The scsi bus is not working yet, but much progress
has been made.

A few of the issues I've encountered so far:

 1. The biggest problem is dealing with the NeXT dma alignment
    requirements, which I deal with by stuffing bytes into the SCSI
    chip fifo before and after I DMA so the actual dma buffer is
    aligned.  Unfortunately, this leads to problems with the transfter
    count, especially when there are fewer bytes transferred than
    expected.

 2. Synchronous transfer negotiation is turned off until I can figure
    out how to get interrupted after the negotiation message is sent
    out.

 3. There are a couple of extra SCSI control registers on the NeXT,
    that have to be frobbed correctly or the chip doesn't initialize
    and and the chip registers even seem to disappear.  It looks like
    these are under control now.

 4. The nextdma driver needs a little tweaking to deal with interrupted
    transfers and I need to check that non-continuous multiple page
    buffers works ok.  The bus_dma code also needs to be updated to
    track changes in alpha/common/bus_dma.c

 5. The ncr53c9x driver doesn't have a way for me to get dma interrupts
    when it is using the scsi in polled mode.  I might also have to
    hack up the MI driver to get an accurate transfer count when
    I stuff the FIFO and also do DMA.  I'm currently looking
    at ways around this, or at least clean changes to the MI driver
    that might let me do what I want.

I just committed this work, so it should show up in the -current
sources shortly for people who want to take a peek.  The esp match
function returns 0 though, so it won't get in the way if you build
a kernel with it.

Thanks to Rolf for decoding some of the scsi interface in his
bootloader, and Mycroft for his help understanding the scsi protocol
and the NetBSD ncr53c9x MI driver.

Darrin