7. ATAPI Packet Command Specification
MODE SENSE
SONY AIT-2 Turbo drive SDX-560V series Ver.1.0
7-26
Allocation Length:
The Allocation Length specifies the number of bytes that the HOST has allocated for returned
MODE SENSE data. An Allocation Length of ZERO means that the drive will return no MODE SENSE data. This
is not considered an error and GOOD status will be returned. Any other value indicates the maximum number of
bytes that can be transferred. The drive terminates the data transfer when the Allocation Length bytes have been
transferred or when all available MODE SENSE data has been transferred, whichever is less. The Allocation
Length must fall on header or block descriptor boundaries. If the Allocation Length does not fall on these
boundaries then the drive returns CHECK CONDITION status with the ILLEGAL REQUEST sense key set, unless
the value is greater than that required for the specified page.
Table 7-33: MODE PAGE Mode Parameter Header
Bit
Byte
7 6 5 4 3 2 1 0
0
Mode Data Length
1
Medium Type (34h)
2
WP
Buffered Mode (001b)
Speed (00h)
3
Block Descriptor Length (08h)
4
Density Code (39h)
5
(MSB)
6
7
Number of Blocks (00 00 00h)
(LSSB)
8
Reserved
9
(MSB)
10
11
Block Length
(LSB)
When using the MODE SENSE command, the
mode data length
field specifies the length in bytes of the
following data that is available to be transferred. The mode data length does not include itself. When using the
MODE SELECT command, this field is reserved.
Media Type:
The media value will be 34h as only one media type is supported.
WP:
A Write Protected bit of ZERO indicates that the tape is write enabled. A Write Protected bit of one indicates
that the tape is write protected.
The
block descriptor length
specifies the length in bytes of all the block descriptors. It is equal to the number of
block descriptors times eight and does not include pages or vendor-specific parameters, if any, that may follow the
last block descriptor. A block descriptor length of zero indicates that no block descriptors are included in the mode
parameter list. This condition shall not be considered an error.
Buffered Mode:
This is set to ONE and the drive is in buffered mode and may report a GOOD status on WRITE
commands as soon as the data block has been transferred to the drive’s buffer. One or more blocks may be
buffered prior to writing to the tape. This bit is defaulted to ONE. This Drive only supports the Buffered Mode bit
set to ONE.
Block descriptors specify some of the medium characteristics. The block descriptor contains a
Density Code
field,
a
Number of Blocks
field, and a
Block Length
field. Block descriptor values are always current (i.e., saving is not
supported).
Density Code:
The drive returns 30h in the Density Code field.
The
Number of Blocks
field specifies the number of logical blocks on the medium to which the density code and
block length fields apply. A value of zero indicates that all of the remaining logical blocks of the Device shall have
the medium characteristics specified.
The
Block Length
specifies the current length in bytes of each logical block described by the block descriptor for
the current medium.