Specifications

ATAPI For Streaming Tape QIC-157 Rev B
40
parameters, diagnostic parameters, etc.). A parameter length of zero indicates that no data shall be
transferred. This condition shall not be considered as an error.
6.2.5. Allocation Length
The Allocation Length Field specifies the maximum number of bytes that the Host computer has
allocated for returned data. An allocation length of zero indicates that no data shall be transferred.
This condition shall not be considered as an error. The Device shall terminate the data transfer when
allocation length bytes have been transferred or when all available data have been transferred to the
Host, whichever is less. The allocation length is used to limit the maximum amount of data (e.g.
sense data, mode data, etc.) returned to the Host.
6.3. Status
A Status byte shall be sent from the Device to the Host at the completion of each command unless
the command is terminated by one of the following events:
1. a reset condition;
2. an unexpected event
Status is normally presented at the end of a command, but in some cases may occur prior to
transferring the Command Packet.
For a description of the Status Byte see Figure 3-1 ATAPI Status Register (ATA Status Register) on
page 20.
6.4. Command Processing Considerations and Exception Conditions
The following sections describe some exception conditions and errors associated with command
processing and the sequencing of commands.
6.4.1. Parameter Rounding
Certain parameters sent to an ATAPI Device with various commands contain a range of values.
ATAPI Devices may choose to implement only selected values from this range. When the ATAPI
Device receives a value that it does not support, it either rejects the command (“Check Condition”
status with ILLEGAL REQUEST Sense Key) or it rounds the value received to a supported value.
The ATAPI Device shall reject unsupported values unless rounding is permitted in the description
of the parameter.
Rounding of parameter values, when permitted
2
, shall be performed as follows - An ATAPI Device
that receives a parameter value that is not an exact supported value shall adjust the value to one that
it supports and shall return “Check Condition” status with a Sense Key of RECOVERED ERROR.
The Additional Sense Code shall be set to ROUNDED PARAMETER. The Host is responsible for
issuing an appropriate command to learn what value the ATAPI Device has selected.
2
. Generally, the ATAPI Streaming Tape Drive should adjust maximum-value fields down to the next lower
supported value than the one specified by the Host Computer. Minimum-value fields should be rounded up to
the next higher supported value than the one specified by the Host Computer. In some cases, the type of
rounding (up or down) is explicitly specified in the description of the parameter.