SCSI Write Commands
Encyclopedia
Write
The Write (6) command is only 6 bytes long and is a legacy from early SCSISCSI
Small Computer System Interface is a set of standards for physically connecting and transferring data between computers and peripheral devices. The SCSI standards define commands, protocols, and electrical and optical interfaces. SCSI is most commonly used for hard disks and tape drives, but it...
days. Its use is restricted to 21-bit LBA
Logical block addressing
Logical block addressing is a common scheme used for specifying the location of blocks of data stored on computer storage devices, generally secondary storage systems such as hard disks....
s. The CDB structure is:
bit→ ↓byte |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|
0 | Operation code = 0Ah | |||||||
1 | Reserved | LBA | ||||||
2 | LBA | |||||||
3 | LBA | |||||||
4 | Transfer length | |||||||
5 | Control |
Write (10)
The Write (10) command was introduced to cope with 32-bit LBAs. It also included four other enhancements. Disable Page Out (DPO) allows the initiatorSCSI initiator
In computer data storage, a SCSI initiator is the endpoint that initiates a SCSI session, that is, sends a SCSI command. The initiator usually does not provide any Logical Unit Numbers ....
to warn the target that the data being written is unlikely to be read back soon and so is not worth keeping in the target's data cache. Force Unit Access (FUA) tells the target to immediately send the data to the media surface and to not buffer it through a cache. The EBP bit tells the target that it may skip the erase process when writing data. The RelAdr bit is used to indicate that the LBA value is relative (only used with linked commands). The CDB structure is:
bit→ ↓byte |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|
0 | Operation code = 2Ah | |||||||
1 | WRPROTECT | DPO | FUA | Reserved | FUA_NV | Obsolete | ||
2–5 | LBA | |||||||
6 | Reserved | Group Number | ||||||
7–8 | Transfer length | |||||||
9 | Control |
Write (12)
The Write (12) command is similar to the Write(10) command except that it has a larger Transfer Length field. The CDB structure is: bit→ ↓byte |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|
0 | Operation code = AAh | |||||||
1 | WRPROTECT | DPO | FUA | Obsolete | FUA_NV | Obsolete | ||
2–5 | LBA | |||||||
6–9 | Transfer length | |||||||
10 | Restricted for MMC-6 | Reserved | Group Number | |||||
11 | Control |
Write (16)
The CDB structure is: bit→ ↓byte |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|
0 | Operation code = 8Ah | |||||||
1 | WRProtect | DPO | FUA | Reserved | FUA_NV | Obsolete | ||
2–9 | LBA | |||||||
10-13 | Transfer Length | |||||||
14 | Restricted for MMC-6 | Reserved | Group Number | |||||
15 | Control |
Write (32)
The CDB structure is: bit→ ↓byte |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|
0 | Operation code = 7Fh | |||||||
1 | Control | |||||||
2–5 | Reserved | |||||||
6 | Reserved | Group Number | ||||||
7 | Additional CDB Length (18h) | |||||||
8-9 | Service Action (000Bh) | |||||||
10 | WRProtect | DPO | FUA | Reserved | FUA_NV | Reserved | ||
12–19 | LBA | |||||||
20–23 | Expected Initial Logical Block Reference Tag | |||||||
24–25 | Expected Logical Block Application Tag | |||||||
26–27 | Logical Block Application Tag Mask | |||||||
28–31 | Transfer Length |
Write Long (10)
The Write Long command allows for Error Correcting Code (ECC). The data sent from the initiator will include ECC fields as well as real data. The Byte Transfer Length field tells the target how much data will need to be returned when the data is subsequently retrieved with a Read Long commandSCSI Read Commands
- Read :The Read command is only 6 bytes long and is a legacy from early SCSI days. Its use is restricted to 21-bit LBAs and 8-bit Transfer Length fields. It has been present since the SASI specification...
. The CDB structure is:
bit→ ↓byte |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|
0 | Operation code = 3Fh | |||||||
1 | COR_DIS | WR_UNCOR | PBLOCK | Reserved | Obsolete | |||
2 | LBA | |||||||
3 | ||||||||
4 | ||||||||
5 | ||||||||
6 | Reserved | |||||||
7 | Byte Transfer Length | |||||||
8 | ||||||||
9 | Control |
Write Long (16)
The CDB structure is: bit→ ↓byte |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|
0 | Operation code = 9Fh | |||||||
1 | COR_DIS | WR_UNCOR | PBLOCK | Service Action (11h) | ||||
2–9 | LBA | |||||||
10 | Reserved | |||||||
11 | ||||||||
12 | Byte Transfer Length | |||||||
13 | ||||||||
14 | Reserved | |||||||
15 | Control |