Servicing the TARGET Requests

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 message-in phase and the TARGET role returns an intermediate status $xx06 for command received.

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 -- command table pointer.) You may wish to service the processor device standard commands SEND ($0A) and RECEIVE ($08). The service of commands is totally application driven. The SEND and RECEIVE commands are probably sufficient to establish processor communication over the SCSI bus. Following is an example of each service. "Example"

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

6-7

Page 75
Image 75
Emerson MVME147 manual Servicing the TARGET Requests