SCSI Commands
Page
77
The drive reports the Incorrect Length error based on the Suppress Incorrect Length
Indicator (SILI) bit as follows:
•
If the actual block length exceeds the CDB Transfer Length, the Incorrect Length
error is reported.
•
If the actual block length is smaller than the CDB Transfer Length and the SILI
bit is 1, the drive ignores (that is, suppresses) the Incorrect Length error.
•
If the actual block length is different than the CDB Transfer Length and the SILI
bit is 0, the drive reports the Incorrect Length error.
The drive reports the Incorrect Length error by returning a Check Condition. The
Incorrect Length Indicator bit (byte 2, bit 5) of the Request Sense data is set (1)
indicating the Incorrect Length error. The Valid bit (byte 0, bit 7) of the Request
Sense data is also set (1) indicating that the residual data (bytes 3 through 6) is
valid. The meaning of the residual data depends on the setting of the Fixed bit.
For reading both fixed- and variable-length blocks, the logical position after
encountering an Incorrect Length error in block N is always at the end of block N.
The following figure illustrates this position.
Current Block Size = 512 bytes/block
Block N-1
Block N
Block N
N+1
512 bytes
514 bytes
512 bytes
↑
↑
Encounter ILI
Logical Position
error reading
after ILI error
block N
Fixed Mode Residual Data
When the Fixed bit is set (1), the residual data is set to the CDB Transfer Length
minus
the actual number of blocks
correctly
read without encountering an ILI error.
For example, assume the following:
•
The current block size is 512 bytes/block.
•
The drive is currently positioned before block N.
•
Block N contains 514 bytes.
If the host issues a READ command with a CDB Transfer Length of one, indicating
one 512-byte block is to be read, the drive transfers the first 512 bytes of block N;
then skips the last two bytes (513 and 514) and reports a Check Condition (caused
by an Incorrect Length error). The residual is set to one. This residual is determined
as follows:
CDB Transfer Length = Number of blocks correctly read without encountering an ILI
error (1 - 0 = 1).
The logical position after the error is after byte 514 of block N.