720 likes | 916 Views
Serial Attached SCSI (SAS) Clause 9. UNH InterOperability Lab. Clause 8. Port Layer Links SAS Link Layer state machines with SSP, SMP, and STP state machines Operation of the Port Layer is transparent No major testable items are be found in Clause 8. Presentation Topics.
E N D
Serial Attached SCSI (SAS)Clause 9 UNH InterOperability Lab
Clause 8 Port Layer Links SAS Link Layer state machines with SSP, SMP, and STP state machines Operation of the Port Layer is transparent No major testable items are be found in Clause 8
Presentation Topics Transport Layer Protocols SSP Frame Types Sequencing Command Mapping Sample Traces SMP STP
SSP Connections First, an SSP Connection is opened between two link partners One must be an SSP Initiator The other must be an SSP Target Determined by bits asserted in the Identify Address Frames
SSP Open Frame Frame Type 1 Byte value 0x01, 0x05, 0x06, 0x07, 0x16 0xF0 through 0xFF are vendor specific All others are reserved and invalid
SSP Open Frame Hashed Destination and Source Addresses 4 byte address calculated from the WWNs of the source and destination Details on Hash Algorithm and collision likelihood found in Annex H of the SAS 2.0 Standard
SSP Open Frame TLR Control Valid for only Command Frames Reserved for all other frame types Used to communicate support for Transport Layer Retries by initiators See Section 9.2.1 of SAS 2.0 Standard for more details
SSP Open Frame Retry Data Frames Valid only for XFER_RDY Frames Reserved for all other frame types Set to 1 indicates to initiator to disable Transport Layer Retries for write DATA frames associated with this XFER_RDY
SSP Open Frame Retransmit Valid for TASK, RESPONSE, and XFER_RDY Frames Reserved for all other frame types Set to one indicates the frame is a retransmission Circumstances described in 9.2.4 of SAS 2.0 Standard
SSP Open Frame Changing Data Pointer Valid for Retransmitted DATA Frame Reserved for all other frame types Set to one indicates that DATA OFFSET field may not be sequentially increased More details in section 9.2.4.5 of SAS 2.0 Standard
SSP Open Frame Number of Fill Bytes Valid for DATA and RESPONSE Frames Reserved for all other frame types Specifies the number of bytes between the Information Unit and the CRC in the frame added to make the size of the frame divisible by 4 Needed for the CRC calculation to work correctly
SSP Open Frame Initiator Port Transfer Tag AKA “Tag” Used for establishing context for Commands and Tasks Assigned by Initiators
SSP Open Frame Target Port Transfer Tag AKA “TPTT” Used for establishing context for DATA Writes Assigned by a target Optionally implemented by targets
SSP Open Frame Data Offset Used to discribe where the data is placed relative to series of data commands Valid for only DATA frames Ignored in all other frames
SSP Open Frame Information Unit Non-general information unit DATA, XFER_RDY, COMMAND... Varies by frame type Contents covered further in this presentation (slide 20)
SSP Open Frame Fill Bytes Added only if needed Used to make frame size divisible by 4 for CRC calculations Number in command specified by Number Of Fill Bytes Field
SSP Open Frame CRC – Cyclic Redundancy Check CRC is used to detect bit errors inside of transmitted frames Transmitter calculates CRC and attaches it to every frame Receiver calculates CRC at receiption and if it doesn't match what is received, transmits NAK (CRC ERROR) to the transmitter
SSP Open Frame CRC – Cyclic Redundancy Check Computed over the entire SSP Frame See Annex G of SAS 2.0 Standard for more information on CRC
SSP Connections Once the SSP Connection (see Clause 7) is established, five types of frames can be transmitted inside that SSP connection DATA XFER_RDY COMMAND RESPONSE TASK
SSP Frame Types DATA Carries actual data to and from targets and initiators XFER_RDY Sent by targets giving initiators permission to transmit data COMMAND Contains CDBs for commands sent by initiators
SSP Frame Types RESPONSE Sent at the completion of a command by targets to initiators. Contains information regarding current status and the command status TASK Sent by initiators to targets to manage outstanding commands and other non-command related activities
DATA Frames Type: 0x01 Information Unit: Data (Read or Write) Originates: From a SSP Initiator or SSP Target Information Unit Size: 1 to 1024 Bytes
DATA Frames Information Unit Only contains data
XFER_RDY Frames Type: 0x05 Information Unit: Transfer Ready Originates: SSP Targets Only Information Unit Size: 12 bytes
XFER_RDY Frames Information Unit Requested Offset Specifies an offset in the write data buffer of the application client which can be transmitted in the context of this XFER_RDY frame.
XFER_RDY Frames Information Unit Write Data Length Specifies the number of bytes that may be transmitted within the context of this XFER_RDY frame.
COMMAND Frames Type: 0x06 Information Unit: Command Originates: SSP Initiator Only Information Unit Size: 28 to 280 bytes
COMMAND Frames Information Unit Logical Unit Number Refers to the LUN on the DUT this command will be routed too
COMMAND Frames Information Unit Enable First Burst Set to 1 specifies that the SSP port shall expect first burst data for the command as defined by the FIRST BURST SIZE field in the Disconnect-Reconnect Mode Page
COMMAND Frames Information Unit Command Priority Specifies the importance of the command relative to other commands with TASK ATTRIBUTE set to 0
COMMAND Frames Information Unit Task Attribute Used to control the order of execution of received commands
COMMAND Frames Information Unit Task Attribute Simple: 000b Relies on COMMAND PRIORITY field for order of execution via rules defined in SAM-4
COMMAND Frames Information Unit Task Attribute Simple: 000b Relies on COMMAND PRIORITY field for order of execution via rules defined in SAM-4
COMMAND Frames Information Unit Task Attribute Head of Queue: 001b Specifies the Command is to be handled according to the HEAD OF QUEUE task attribute defined in SAM-4
COMMAND Frames Information Unit Task Attribute Ordered: 010b Specifies the command is to be handled according the ORDERED task attribute defined in SAM-4
COMMAND Frames Information Unit Task Attribute ACA: 100b Specifies the command is to be handled according the rules for an ACA task attribute defined in SAM-4
COMMAND Frames Information Unit Task Attribute All other values (011b and 101b-111b) are reserved and shall be considered invalid
COMMAND Frames Information Unit Additional CDB Length Length in Dwords (4 bytes) of the ADDITIONAL CDB field
COMMAND Frames Information Unit CDB and Additional CDB Bytes Together contain the Command Descriptor/Date Block of the command Commands are defined in SCSI Command Standards SPC, SBC, SSC, etc...
CDB Example Sample CDB – READ (16) Command Covered in more detail in the SCSI presentation
TASK Frames Type: 0x16 Information Unit: Task Management Function Originator: SSP Initiator only Information Unit Size: 28 bytes
TASK Frames Information Unit Logical Unit Number Refers to the LUN on the DUT this Task Management Function will be routed too
TASK Frames Information Unit Task Management Function Specifies the type of task management function
TASK Frames Information Unit Task Management Function 01h: ABORT TASK: Instructs the LUN to abort the task with the IPTT specified in the TASK Frame 02: ABORT TASK SET: Instructions the LUN to abort the task set associated with the ITPT specified in the TASK Frame
TASK Frames Information Unit Task Management Function 04h: CLEAR TASK SET: Instructs the LUN to clear the task set associated with the IPTT specified in the TASK Frame. 08h: LOGICAL UNIT RESET: Instructs the LUN to perform a reset 10h: I_T NEXUS RESET: Instructs the LUN to perform an I_T NEXUS RESET
TASK Frames Information Unit Task Management Function 20h: Reserved 40h: CLEAR ACA: Instructs the LUN to perform a Clear ACA function 80h: QUERY TASK: Instructs the LUN to perform a QUERY TASK function on the command associated with the IPTT specified in the TASK Frame
RESPONSE Frames Type: 0x07 Information Unit: Response Information Unit Originator: SSP Target only Information Unit Size: 24 to 1024 bytes
RESPONSE Frames Information Unit Status Qualifier & Status Format Determined by DATAPRES Field
RESPONSE Frames Information Unit Datapres Specifies if no data, response data, or sense data is contained in this frame