February 20, 1989 To: X3T9.2 Committee From: Dan Davies Cipher Subj: Tape Read Overlength Detection w/SILI Bit The following proposal offers revised wording for the sequential-access READ command to allow for block overlength detection during read operations, using the SILI bit. This method is submitted as an alternative to the new bit definition proposed in document 89-021r0. Revise the wording of the sequential-access READ command (9.2.5) on page 9-17 of SCSI-2 Revision 7, as follows: READ Command Peripheral Device Type: Sequential-Access Operation Code Type: Mandatory READ Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (08h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | SILI | Fixed | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- ---| 3 | Transfer Length | -----|--- ---| 4 | (LSB) | -----|-----------------------------------------------------------------------| 5 | Control Byte | ============================================================================== The READ command (Table 9-6) requests that the target transfer one or more block(s) of data to the initiator beginning with the next block on the logical unit. The fixed bit specifies whether fixed-length or variable-length blocks are to be transferred. Refer to the READ BLOCK LIMITS command (9.2.6) for additional information about fixed and variable block mode. If the fixed bit is one, the transfer length specifies the number of fixed- length blocks to be transferred, using the current block length reported in the mode parameters block descriptor (7.5.1). If the fixed bit is zero, a variable-length block is requested with the transfer length specifying the maximum number of bytes allocated for the returned data. A successful READ command with a fixed bit of one shall transfer the requested transfer length times the current block length in bytes to the initiator. A successful READ command with a fixed bit of zero shall transfer the requested transfer length in bytes to the initiator. Upon completion, the logical position shall be after the last block transferred (end-of-partition side). If the suppress incorrect length indicator (SILI) bit is one, the target shall not return CHECK CONDITION status if the only error is that the transfer length is not equal to the actual block length. This option is only valid when the fixed bit is zero. If the suppress incorrect length indicator (SILI) bit is one and the fixed bit is zero, the target shall not report CHECK CONDITION when an incorrect length block is read if the only error is that the requested transfer length does not match the actual block length. The target shall report CHECK CONDITION status for the incorrect length condition if the length of the block exceeds the current value of the block length field (in the mode parameters block descriptor, see 7.3.3). The ILI and valid bits shall be set to one in the sense data and the information field shall be set to the difference (residue) of the requested transfer length minus the actual block length. Targets that do not support negative residues shall set the information field to zero if the actual block length is larger than the requested length. If the current value of the block length field is zero, the target shall not return CHECK CONDITION status for this condition. IMPLEMENTORS NOTE: Since the residue information normally provided in the information field of the sense data may not be available when the SILI bit is set, other methods for determining the actual block length should be used (e.g., length information could be included in the data block). If the SILI bit is one and the fixed bit is one, the target shall terminate the command with CHECK CONDITION status and the sense key shall be set to ILLEGAL REQUEST with an additional sense code of INVALID FIELD IN CDB. If the SILI bit is zero and an incorrect length block is read, CHECK CONDITION status shall be returned and the ILI and valid bits shall be set to one in the sense data. Upon termination, the logical position shall be after the incorrect length block (end-of-partition side). If the fixed bit is one, the information field shall be set to the difference (residue) of the requested transfer length minus the actual number of blocks read (not including the incorrect length block). If the fixed bit is zero, the information field shall be set to the difference (residue) of the requested transfer length minus the actual block length. Targets that do not support negative residues shall set the information field to zero if the actual block length is larger than the requested length.