Servicing the TARGET Requests
service performed by the firmware is now complete. Finishing some housekeeping, the firmware returns to the user service routine for the selected LUN and gives it a final status code of $xx17.
If initiator is not supporting disconnect, no
If firmware is not enabled, the target role will response to ’inquiry’, ’request sense’ commands with some meaningful data. Also, it will return "Not Ready" to ’test unit ready’, ’send’, and ’send diagnostic’ commands. To all other commands before target enabled, an ’Illegal request’ will be returned.
Now comes your turn to perform the required services.
The CDB that was received by the TARGET role firmware during the command phase was stored in the command buffer that was allocated when you issued the TARGET enable packet to the firmware. (The command table pointer points to this command buffer; refer to the TARGET Enable Custom Sequence Packet section in Chapter 2, words $08 and $0A
Example: Servicing the SEND command through the TARGET sequence firmware packet.
STEP 1: Command Interpretation
Below is the CDB for a SEND command.
bit.....7...6...5...4...3...2...1...0...
byte 0 : | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | (OP CODE) |
byte 1 : | l | u | n | - |
| - | - | - | - |
(LUNreserved) |
|
|
|
|
|
|
|
| |
byte 2 : | Transfer length (M S byte) |
| (Transfer | ||||||
length) |
|
|
|
|
|
|
|
|
|
byte 3 : Transfer length (middle byte) | (Transfer | ||||||||
length) |
|
|
|
|
|
|
|
|
|
byte 4 : | Transfer length (L S byte) |
| (Transfer | ||||||
length) |
|
|
|
|
|
|
|
|
|
byte 5 : | v | u | - | - | - | - | f | l | (control |
byte) |
|
|
|
|
|
|
|
|
|
6 |