Subject: Re: byte order for CDB to FAS scsi controller
To: john heasley <heas@shrubbery.net>
From: Ignatios Souvatzis <is@netbsd.org>
List: tech-kern
Date: 05/19/2001 12:21:58
On Sat, May 19, 2001 at 03:10:12AM +0000, john heasley wrote:
> i'm trying to debug a problem with the esp driver for the sbus FAS366
> controller.  as the scsipi stuff trys to attach (?) the targets on
> the scsi buss, a select with attention (SELATN cmd:0x42 + 1 byte msg)
> is used along with a TEST UNIT READY (00h) command to test if a target
> is there and ready.
> 
> [ncr53c9x_scsipi_request] [ncr53c9x_scsipi_request] [0x0, 6]->5 [ncr53c9x_sched]
>  [ncr53c9x_select(t5,l0,cmd:0,tag:0,0)] <cmd:0x1 660>[wrfifo(7): c0 00 00 00 00
> 00 00]
> <cmd:0x42 773>
> 
> this works, but i'm lost as to why the message-byte is written to the
> FAS' fifo first?
> 
> also, any clue as to why that message-byte is for?  i can't find it in
> either the FAS manual or SAM/SPC.

Message bytes are exchanged between initiator and target, e.g., to negotiote
sync transfer, wide transfer, tell the target that it may disconnect (or not),
etc., as "message in" or "message out" transfers - different from "command",
"status", "data in", or "data out" transfers.

This is documented in the SCSI standard.

0xc0 is MSG_IDENTIFYFLAG | MSG_IDENTIFY_DISCFLAG | lun, for a logical unit
number of 0. "I'm calling LUN 0, and you may disconnect."

see sys/dev/scsipi_message.h

Regards,
	-is