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 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|
| 0 | Operation code = 03h | |||||||
| 1 | LUN | Reserved | ||||||
| 2 | Reserved | |||||||
| 3 | Reserved | |||||||
| 4 | Allocation length | |||||||
| 5 | Control | |||||||
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 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|
| 0 | Operation code = 12h | |||||||
| 1 | LUN | Reserved | EVPD | |||||
| 2 | Page code | |||||||
| 3 | Allocation length (MSB) | |||||||
| 4 | Allocation length (LSB) | |||||||
| 5 | Control | |||||||
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 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|
| 0 | Operation code = 1Bh | |||||||
| 1 | LUN | Reserved | Immed | |||||
| 2 | Reserved | |||||||
| 3 | Reserved | |||||||
| 4 | Reserved | LoEj | Start | |||||
| 5 | Control | |||||||
沒有留言:
張貼留言