Subject: sc driver
To: None <port-sun3@NetBSD.ORG>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sun3
Date: 02/14/1997 10:33:25
I am happy to report that as of this morning, I have an sc driver that
works barely well enough for fsck to do a successful check of the
filesystem on a 40 meg Rodime disk I have.

The downside is, "barely" is the word. :-)  In particular, there are
two peculiarities I do not yet understand:

(1) After stuffing the cdb through the interface, I have a debugging
    printf that reports how many times it went around a polling loop
    for each byte of the cdb.  With this printf, it works; without it,
    I have yet to make it work.  I suspect a timing issue.  (The fsck I
    refer to above produced great spammage on the console, one line per
    scsi command issued.)

(2) At some points, a command 1b 00 00 00 01 00 (hex) is issued.  After
    sending a command, the driver waits for the REQUEST line to go
    high, at which point it fetches the status byte.  But after this
    command, the sc's control register stays stuck at 0x0240, which is
    COMMAND|BUSY, and the next command sees the BUSY bit set for too
    long, complains "SCSI bus stuck busy", and resets the bus...at
    which point everything picks up apparently normally.  I find it
    baffling why the sc (or the device, whichever is resposible for
    this oddity) would want to transfer a seventh command byte for
    command 1b (START_STOP, according to <scsi/scsi_all.h>).

Additionally, I have absolutely no DMA support yet - or rather, the
code is thought to be written but I have never even tried to compile
it, never mind use it.  Currently, also, commands with cdb length other
than 6 don't even get passed to the hardware; the driver bounces them
earlier than that.  One person told me recently that the sc may not be
as restricted to 6-byte cdbs as I thought, but I haven't heard any
further info yet.

If anyone wants a copy of the current state of the driver, I'll be glad
to send it.  However, if you aren't prepared to get your hands dirty
with the code, I assure you, you don't want it now - it is not ready
for even alpha-stage real-usage testing yet.  (At this stage, I
strongly recommend to anyone playing with it to put no data you care
about on the relevant scsi bus!)

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B