Subject: new si and reselects
To: None <thorpej@SJ.Xenotropic.COM>
From: Gordon W. Ross <gwr@mc.com>
List: port-sun3
Date: 11/20/1995 11:34:40
> From: Jason Thorpe <thorpej@SJ.Xenotropic.COM>
> Date: Sun, 19 Nov 1995 21:33:35 -0800
> Sender: owner-port-sun3@netbsd.org
> Precedence: list
> X-Loop: port-sun3@NetBSD.ORG
> 
> Just thought I'd provide a heads up on a trange thing that happened this 
> evening ...
> 
> I decided to put a 312MB Micropolis ESDI onto the other LUN of my 
> MD/21.  I partitioned it up, and decided to move /usr over there...when 
> doing the tar, it wedged ... disk wait.

I have one test case where I can get the driver to hang (si_options=7)
in a way that looks like a missed reselect.  That situation should be
handled by the command timeout logic, but in the failure case, I see
one command enqueued awaiting reselect, but no timeout for it.  This
means that a timeout is somehow not scheduled or canceled too early.
We need to review the logic that schedules/cancels command timeouts.
(Oh yeah, the test case is simultaneous fsck on two drives.)

>   I recompiled the kernel with 
> reselects disabled and was working fine.  Now, I jut got a:
> ncr5380_command: short transfer: wanted 10 got 6
> si(0:0:0)-28,0,0,3,b1,0,0,0,10,0-

That is caused by SCSI protocol disagreement between our sd.c and
the Emulex firmware.  I've seen it too, and it appears to always
be in situations where we want to send a 10-byte command and the
Emulex thinks that should be a 6-byte command.  Presumably this
means the Emulex doesn't care about those extra command bytes...
I left this message in there so we would know when it happens,
and to gather some data about it.  Eventually we can turn it off.

> Twice.  On the same file.  Once copying it to the other disk (which is 
> si(0:0:1)) and again comparing them.  This results in a "soft error" 
> message later, which I did see from time to time with the old driver, so 
> I'm guessing it's probably a bad block...happily enough, the file (gdb) 
> compares fine.  Dunno ... kinda weird, though.  Worth noting, installing 
> gdb with the new driver before the last round of changes was fine ... 
> I'll see about the latest one, which is what I'm using now.
> 
> In any case, I thought I post this in case anyone had any ideas...here's 
> what dmesg(8) says, adjusted to fit 80 columns:

Your disk would probably like to be reformatted...

Gordon