2.3 COMMAND CHAINING A multiple command execution option is built into the ISCSI-I firmware. All command RAM blocks that should be executed have to be entered into a command queue. After the last command RAM a long word $~~ must be entered. This detects the end of the queue and the firmware returns into normal single command mode. The location of the command queue is requested in the command chai- ning buffer of the corresponding channel. The queue can be lon- ger than the size of the buffer but must begin at the buffer start address. Each one of the commands in the queue is executed in the same way as in the single command mode. The only diffe- rence is the return value handling.
Error and completion codes are placed into the current command ram in the queue. In addition for the case that an error occurs, an error code is placed into the root command RAM and a pointer to the error command RAM is returned. After execution of each command in the queue and when the whole sequence has been com- pleted optional interrupts can be generated. Figure 2 :
Command Chaining CMDRAM COMMAND CHAINING BUFFER +-------------+ +-------------+ [A] 1 ~~5B 1 ~~~~ 1 +----------->1 CMD IPARAM 1 [B] +-------------+ 1 +-------------+ ~~~~~~~~ 1---------+ 1 PARAM 1 +-------------+ +-------------+ 1 ~~~~~~~~ 1 1 PARAM 1 +-------------+ +-------------+ 1 ~~~~ 1 ~~~~ 1 1 LUN 1 ~~~~ 1 +-------------+ +-------------+ 1 CMD 1 PARAM 1 [C ] +-------------+ 1 PARAM 1 +-------------+ 1 PARAM 1 +-------------+ 1 LUN 1 ~~~~ 1 +-------------+ +-------------+ 1 ~~~~ 1 ~~~~ 1 [D] +-------------+ [A] - CHAIN command [B] - First CMDRAM to chain [C] - Second CMDRAM to chain [D] - End of CHAIN list 2-2