-
Responsibility
- Pass request and confirmations between adjacent layers
- Handle some Link Layer errors
- Construct frames
-
SSP Frames
-
Header Field
- The header communicates the purpose of this frame and how it will be serviced
-
Frame Type
-
Initiator to Target
- COMMAND
- Task Management
-
Target to Initiator
- XFER_RDY
- RESPONSE
-
Both
- Data
- While these can be uninterrupted transaction sequences, the SCSI target is allowed to disconnect at any time and reconnect later to finish the sequence
-
Hashed Destination and Source Addresses
- Once the connection is established, there is no need for address information in the subsequent frames
- Allow devices to verify that the frame is still using the same address that were accepted with the request
-
Retry Data Frames
- Only used with XFER_RDY frames
-
Retransmit
- Indicate whether this frame is a retransmission of an earlier frame
-
Number of fill bytes
- All transfers in groups of fourt bytes called dwords
- Indicate how many bytes were added
- Tag
-
TPTT
- For the target to associate the buffer space for this transaction
- Allow it to be put into the proper buffer with minimal delay
- The initiator must latch the TPTT value every time it sees an XFER_RDY
-
Data offset
- a data offset value that equals the sum of the data offset and data length of the previous transfer
-
The frame with unexpected offset value
- Initiator
- Discard
- Target
- Discard
- Terminate the command
-
Changing Data Pointer
- Indicate that the target is resending a DATA frame with a Data Offset field that may not be sequential with reference to that of the previous frame
-
Information Unit
- Represent the information corresponding to the frame type
-
COMMAND
- LUN
- Enable First Burst
-
Task Attribute
- SIMPLE
- HEAD OF QUEUE
- ORDERED
- ACA
- Additional CDB Length in dwords
- CDB
- Additional CDB Bytes
-
RESPONSE
- DataPres
- Dtatus
- Sense Data Length
- Response Data Length
- Response Data or Sense Data
-
XFER_RDY
- Requested Offset
- Write Data Length
-
Task Management
- LUN
- Task Management Function
- Tag of Task to be Managed
-
Fill Bytes
- make the frame aligned on a dword or four-byte boundary
- Only the Data frame and Response frame can possibly need fill bytes
-
CRC
- The CRC is computed by the transmitter
-
SSP Error Handling
-
General
- Maintain a copy of outgoing frames until the receiveer confirm them so that they cab be replayed if needed
- Software error recovery mechanisms are already in place for SCSI
-
Transport Layer Errors
-
Target errors
-
XFER_RDY
- It should only go to Initiator
- Discard
-
COMMAND
- Incomplete or badly formed
- Send a RESPONSE frame with Response Code field set to Invalid Frame
- With a tag that is already in use
- Send a RESPINSE frame with CHECK CONDITION
-
TASK
- Too short
- Send a RESPONSE frame with Response Code field set to Invalid Frame
-
DATA
- with unknown Tag value
- Discard
- Arrived without permission
- Discard
-
Unknown frame type
- Discard
-
Initiator errors
-
COMMAND
- Discard
-
TASK
- Discard
-
Unsupported frame
- Discard
-
DATA
- with an unknown Tag
- Discard
- Possibly abort the command with that tag
-
XFER_RDY
- not 12 bytes long
- Discard the frame
- Abort the command
-
Link Layer Errors Affected by Transport Layer
-
General
-
The frame is good at the Link Layer
- a ACK primitive is sent
-
Something is not right with it
- a negative acknowledge, NAK, is sent
-
COMMAND
-
with NAK
- Simply repeat
-
no ACK or NAK
- Initiator's ACK/NAK timeout counter will expire after 1ms(p.236)
- Find out what happened
-
Inffered Response to COMMAND Frame
-
no ACK, but an appropriate response arrives
- the missing ACK can be inferred from the response of the target
-
sending a RESPONSE but not see an ACK
- p.237
-
TASK
-
an ACK/NAK timeout observed
- Close connection with DONE
- Reopen a connection
- Send TASK with the same tag, set RETRANSMIT bit
-
no ACK, but a RESPONSE before ACK.NAK timeout
- Assumed received
-
XFER_RDY
-
ACK/NAK timeout
- Close → Reopen connection
- TLR set
- resend XFER_RDY
- Different TPPT
- RETRANSMIT set
- TLR not set
- send RESPONSE
- CHECK CONDICTION
- ABORT COMMAND
- ACK/NAK TIMEOUT
-
NAK
- the same as before, not close the connection first
-
Handling Errors in Non-Interlocked DATA Frames
-
Read
-
ACK/NAK timeout
- Close → Reopen connection
- TLR set
- Retransmit all the DATA frames since the last time ACK/NAK Balance occurred
- TLR not set
- send RESPONSE
- CHECK CONDICTION
- ABORT COMMAND
- ACK/NAK TIMEOUT
-
NAK
- the same as before, not close the connection first
-
Write
-
ACK/NAK timeout
- Close → Reopen connection
- TLR set
- Retransmit all the DATA frames since the previous XFER_RDY
- TLR not set
- ABORT TASK
-
NAK
- No close and reopen
- TLR set
- Retransmit all the DATA frames since the previous XFER_RDY
- TLR not set
- ABORT TASK
-
SMP Transport Layer
- Only one request and one response can be sent within an SMP connection and then must be closed
-
No flow control or permission to transmit
- no XFER_RDY, RRDY, DATA
- Both sides close the connection after the RESPONSE
-
SSP State Machine
-
Transport Layer Messages
-
Initiator Communication (App ↔ Trans)
- p.246
-
Requests
- Accept_Reject OPENs
- Indicate whether it wishes to accept new incoming connections
-
Indications and Confirmations
- Nexux Loss
- Indicate that the lower layers were unable to reconnect with a device with which communication had already been established, and have given up trying
- Transport Reset
- Indicate that the Transport Layer has received a confirmation that a HARD_RESET was received on the link
-
Target Communication (App ↔ Trans)
- p.247
-
Response
- Send Command Complete
- RESPONSE frame
- Indicate the status of a command
- GOOD
- CHECK CONDITION
- etc.
- Task Management Function Executed
- RESPONSE frame
- Describe the status of a Task Management request
- Send Data_Out
- XFER_RDY frame
- Terminate Data Transfer
- Accept_Reject OPENs
- Indications and Confirmations
-
Initiator State Machines
-
General
-
An initiator has only one IFT, but may have several ITS
- IFR: Initiator Frame Router
- ITS: initiator Transport Server
- The launching point for outgoing frame requests coming from the App.
- The target for the incoming frames whcih it then passes back to it
-
Outing requests create
- COMMAND
- DATA
- TASK
-
Incoming frames
- XFER_RDY
- DATA
- RESPONSE
- Outgoing Frames
- Incoming Frames
- Cancelling Requests
-
Target State Machines
-
General
- TFR: Target Frame Router
- TTS: Target Transport Server
-
SMP State Machines
-
Initiator port
- MT_IP: SMP Transport Layer for Initiator Ports
-
Target port
- MT_TP: SMP Transport Layer for Target Ports