Subject: new si and reselects
To: None <port-sun3@NetBSD.ORG>
From: Ian Dall <dall@HFRD.DSTO.GOV.AU>
List: port-sun3
Date: 12/05/1995 10:49:40
"Gordon W. Ross" <gwr@mc.com> writes:

  Jim> From: jim@reptiles.org (Jim Mercer)
  Jim> ncr5380_command: short transfer: wanted 10 got 6.
  Jim> si(0:0:0)-28,0,0,1c,3e,c0,0,0,20,0-

I am seeing the same problem attempting to copy the the mini-root from
to a Fujitsu disk (can't remember the model off hand, built in scsi
interface).

  Gordon> When you see "wanted 10 got 6" it is not a hard error.  The system
  Gordon> should continue without problem if you enter the "continue" command
  Gordon> at the "db>" prompt.  It was a mistake to leave the debug variable
  Gordon> set which controls this debugger stop.

What happens then? If the command is rejected you still can't
read/write to the disk unless the driver does something smart to
compensate.

  Gordon> Here is how you turn off the debugger breaks in the si driver:

  Gordon> # gdb -k --write /netbsd
  Gordon> (kgdb) set ncr5380_debug = 0
  Gordon> (kgdb) quit

But there is no gdb on the ram disk and I don't get a "db>" prompt
either.  After the error message I just get the shell prompt back.

  Gordon> I have only seen this protocol disagreement with the "si" driver
  Gordon> talking to an Emulex SCSI/ESDI target adapter (common on 3/260).
  Gordon> Your "QUANTUM EMPIRE_1080S" appears to have the same problem.

This is a problem for me. I have two disks for my 3/50. The above
mentioned Fujitsu and a "Sun" disk which is really a Toshiba with the
above target adaptor. I was thinking of swapping the disks around so
the Toshiba would be the root disk (instead of the Fujitsu) but if
what you say about the emulux controller is true it looks like I am
hosed either way.

Autoconf finds the disks OK and edlabel can print the partition table
(I haven't tried writing it since it is already partitioned
satisfactorilly).

  Gordon> SCSI targets control how many bytes are actually transfered in any
  Gordon> SCSI bus phase, but the "si" driver doesn't trust the target (good
  Gordon> practice) and checks all transfer lengths.  This particular SCSI
  Gordon> command (28: READ_BIG - 4 byte block number) is supposed to be
  Gordon> ten bytes long, but some targets appear to become confused and
  Gordon> assume the command is 6 bytes long like most other commands.
  Gordon> Perhaps they have all they need to reject the command...

I have used the disk satisfactorilly under SunOs and Mach3. I don't
know about the former, but the latter uses short read/write commands
unless the parameters are such that extended read/write commands are
necessary. For a small disk, this may always be the case, which could
be why I have never seen the problem before.

Any suggestions? Those emulux controllers were "standard" peripherals
for the 3/50 and 3/60 shoe boxes so supporting installation onto them
is pretty desirable.

Ian