Subject: MI-SCSI question
To: None <tech-kern@NetBSD.ORG>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 02/04/1997 23:20:15
I got back to working on the sc driver for the sun3 port.  This is a
SCSI interface that is amazingly dumb in some ways.  In particular, it
simply cannot deal with cdbs other than 6 bytes long.

I turned on a bunch of debugging, and see the following sequence when I
boot my test kernel (summarized):

command: 00 00 00 00 00 00 (TEST_UNIT_READY) -> 0 bytes transferred
command: 12 00 00 00 2c 00 (INQUIRY) -> 44 bytes transferred
output: sd2 at scsibus1 targ 1 lun 0 <...>
command: 1b 00 00 00 01 00 (START_STOP) -> 0 bytes transferred
command: 1a 00 04 00 20 00 (MODE_SENSE) -> 46 bytes transferred
output: sd2(sc0:1:0) 680 cyls, 5 heads, 0 precomp, 0 red_write, 0 land_zone
command: 25 00 00 00 00 00 00 00 00 00 (READ_CAPACITY) -> failure
	(of course, since it's 10 bytes, not 6 bytes, long)
output: sd2(sc0:1:0): could not get size
output: 0MB, 680 cyl, 5 head, 0 sec, 512 bytes/sec x 0 sectors

Now I'm _sure_ I saw some commit messages indicating that the MI SCSI
subsystem no longer depended on non-6-byte commands, so why is it
falling over when a 10-byte command fails?  Am I doing something wrong?
I sure _thought_ those were pre-1.2 commits, and this is a 1.2 kernel
tree I'm working with.  Do I need to set some quirk?  (I didn't see
anything promising when looking at the list of quirks.)  Or is the real
mistake here my canning things when I saw the message claiming the
thing had zero sectors, and it actually would have worked fine anyway?

I have full dmesg output, in case anyone wants to see it.  Some of the
debugging gunk is specific to my driver, but not all.

					der Mouse

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