2011年12月23日 星期五

About the SCSI CDB (Command Descriptor Block) allocation block

The "Allocation length" is the byte 4 in the typical CDB structure.  But "Allocation length" is the byte 3 and byte 4 in the Inquiry command structure.  And the byte 4 is the "LoEj" and "Start" in the Start/Stop Unit command.


It's poor that the allocation length seems not well definite in the CDB spec.


--------------------------------------------------------------------------------------------------------------------------------
From http://en.wikipedia.org/wiki/SCSI_CDB

Each CDB can be a total of 6, 10, 12, or 16 bytes, but later versions of the SCSI standard also allow for variable-length CDBs. The CDB consists of a one byte operation code followed by some command-specific parameters.
A typical CDB structure is:
bit→
↓byte
76543210
0Operation code = 03h
1LUNReserved
2Reserved
3Reserved
4Allocation length
5Control


From http://en.wikipedia.org/wiki/SCSI_Inquiry_Command

The SCSI Inquiry command is used to obtain basic information from a target device.[1] The CDB structure is:
bit→
↓byte
76543210
0Operation code = 12h
1LUNReservedEVPD
2Page code
3Allocation length (MSB)
4Allocation length (LSB)
5Control


From http://en.wikipedia.org/wiki/SCSI_Start_Stop_Unit_Command

The SCSI Start/Stop Unit command is used to control the motor in a rotary device such as a SCSI disk-drive. It is also used to load or eject removable media, such as a tape or compact disc. It is a frequently-used command and is often the first one issued after initial communication has been established between the initiator and the target.
The CDB structure is:
bit→
↓byte
76543210
0Operation code = 1Bh
1LUNReservedImmed
2Reserved
3Reserved
4ReservedLoEjStart
5Control




沒有留言:

張貼留言