American National Standard part 3
9. Group 0 Command Descriptions for Sequential-Access Devices
The Group 0 commands for sequential-access devices shall be as shown in
Table 9-1.
Table 9-1
Group 0 Commands for Sequential-Access Devices
==============================================================================
Operation
Code Type Command Name Section
------------------------------------------------------------------------------
00H O TEST UNIT READY 7.1.1
01H M REWIND 9.1
02H V
03H M REQUEST SENSE 7.1.2
04H R
05H E READ BLOCK LIMITS 9.2
06H V
07H V
08H M READ 9.3
09H V
0AH M WRITE 9.4
0BH O TRACK SELECT 9.5
0CH V
0DH V
0EH V
0FH O READ REVERSE 9.6
10H M WRITE FILEMARKS 9.7
11H O SPACE 9.8
12H E INQUIRY 7.1.3
13H O VERIFY 9.9
14H O RECOVER BUFFERED DATA 9.10
15H O MODE SELECT 9.11
16H O RESERVE UNIT 9.12.1
17H O RELEASE UNIT 9.12.2
18H O COPY 7.1.4
19H O ERASE 9.13
1AH O MODE SENSE 9.14
1BH O LOAD/UNLOAD 9.15
1CH O RECEIVE DIAGNOSTIC RESULTS 7.1.5
1DH O SEND DIAGNOSTIC 7.1.6
1EH O PREVENT/ALLOW MEDIUM REMOVAL 9.16
1FH R
==============================================================================
Key: M = Command implementation is mandatory.
E = Command implementation is required for SCSI devices that support
device-independent self-configuring software.
O = Command implementation is optional.
R = Operation code is reserved for future standardization.
V = Operation code is available for vendor unique commands.
9.1 REWIND Command
Peripheral Device Type: Sequential Access
Operation Code Type: Mandatory
Operation Code: 01H
Table 9-2
REWIND Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Immed |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Reserved |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The REWIND command (Table 9-2) requests that the target rewind the logical
unit to the beginning-of-medium or load-point.
An immediate (Immed) bit of one indicates that status shall be returned as
soon as the operation is initiated. An Immed bit of zero indicates that
status shall be returned after the operation is completed.
9.2 READ BLOCK LIMITS Command
Peripheral Device Type: Sequential Access
Operation Code Type: Extended
Operation Code: 05H
Table 9-3
READ BLOCK LIMITS Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Reserved |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The READ BLOCK LIMITS command (Table 9-3) requests that the target's
capability for block length limits be returned for the logical unit. The READ
BLOCK LIMITS data shown in Table 9-4 shall be sent during the DATA IN phase of
the command.
Table 9-4
READ BLOCK LIMITS Data
==============================================================================
Byte | Description |
==============================================================================
0 | Reserved |
-----|-----------------------------------------------------------------------|
1 | Maximum Block Length (MSB) |
-----|-----------------------------------------------------------------------|
2 | Maximum Block Length |
-----|-----------------------------------------------------------------------|
3 | Maximum Block Length (LSB) |
-----|-----------------------------------------------------------------------|
4 | Minimum Block Length (MSB) |
-----|-----------------------------------------------------------------------|
5 | Minimum Block Length (LSB) |
==============================================================================
If the maximum block length equals the minimum block length, only fixed-
length blocks of the length indicated are supported. Otherwise, variable-
length blocks are supported. For variable-length blocks, if the maximum block
length equals zero, no upper limit is specified.
9.3 READ Command
Peripheral Device Type: Sequential Access
Operation Code Type: Mandatory
Operation Code: 08H
Table 9-5
READ Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Fixed |
-----|-----------------------------------------------------------------------|
2 | Transfer Length (MSB) |
-----|-----------------------------------------------------------------------|
3 | Transfer Length |
-----|-----------------------------------------------------------------------|
4 | Transfer Length (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The READ command (Table 9-5) transfers one or more block(s) to the initiator
beginning with the next block on the logical unit. The fixed bit specifies
both the meaning of the transfer length field and whether fixed-length or
variable-length block(s) are to be transferred.
If the fixed bit is zero, a single block shall be transferred with the
transfer length specifying the maximum number of bytes the initiator has
allocated for the returned data. If the actual block length is different from
the specified transfer length, a CHECK CONDITION status shall be sent to the
initiator and the incorrect length indicator (ILI) bit and valid bit in
extended sense shall be set to one. The information bytes in extended sense
shall be set to the difference (residue) between the requested transfer length
and the actual block length. Targets that do not support negative residues
shall set the ILI bit to one and the residue to zero when the actual block
length is larger than the transfer length. In any case, no more than transfer
length bytes shall be transferred to the initiator and the medium shall be
positioned after the block (end-of-medium side).
If the fixed bit is one, the transfer length specifies the number of blocks
to be transferred to the initiator. This form of the READ command is valid
only if the logical unit is currently operating in fixed block mode. A
logical unit is in fixed block mode when either of the following conditions
are true:
(1) The logical unit reports the same value for minimum block length and
maximum block length in response to the READ BLOCK LIMITS command. In this
case, the current block length is the value returned.
(2) The logical unit unit has been instructed to use fixed-length blocks
with the MODE SELECT command. In this case, the current block length is the
block length defined in the MODE SELECT command.
Otherwise, the logical unit is in variable block mode. The target may
implement fixed block mode, variable block mode, or both modes. If the fixed
bit does not match the current mode, or the mode indicated by the fixed bit is
not implemented, the target shall reject the command by returning a CHECK
CONDITION status and by setting the sense key to ILLEGAL REQUEST.
A successful READ command with the fixed bit equal to one shall transfer the
current block length times the transfer length bytes of data to the initiator.
Upon termination of the READ command, the medium shall be positioned after the
last block transferred (end-of-medium side).
If the fixed bit is one and if a block is read that is larger or smaller
than the current block length, a CHECK CONDITION status shall be returned to
the initiator. The ILI bit and the valid bit in extended sense shall be set
to one. The information bytes shall be set to the difference (residue)
between the requested transfer length and the actual number of blocks read
(not including the incorrect length block). Upon termination, the medium
shall be positioned after the incorrect length block (end-of-medium side).
If a logical unit reads a filemark during a READ command, it shall send a
CHECK CONDITION status to the initiator and shall set the filemark bit in
extended sense. Upon termination, the medium shall be positioned after the
filemark (end-of-medium side). If the fixed bit is one, the target shall set
the valid bit to one and the information bytes shall be set to the difference
(residue) between the requested transfer length and the actual number of
blocks read (not including the filemark).
If a logical unit encounters the physical end-of-medium during a READ
command, the target shall return a CHECK CONDITION status to the initiator and
shall set the end-of-medium (EOM) bit to one in extended sense. The sense key
shall be set to MEDIUM ERROR. If the fixed bit is one, the target shall set
the valid bit to one and the information bytes to the difference (residue)
between the requested transfer length and the actual number of blocks
successfully read. The medium position following this condition is not
defined.
When the transfer length is zero, no data shall be transferred and the
current position on the logical unit shall not be changed. This condition
shall not be considered as an error.
9.4 WRITE Command
Peripheral Device Type: Sequential Access
Operation Code Type: Mandatory
Operation Code: 0AH
Table 9-6
WRITE Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Fixed |
-----|-----------------------------------------------------------------------|
2 | Transfer Length (MSB) |
-----|-----------------------------------------------------------------------|
3 | Transfer Length |
-----|-----------------------------------------------------------------------|
4 | Transfer Length (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The WRITE command (Table 9-6) transfers one or more block(s) from the
initiator to the current position on the logical unit. The fixed bit
specifies both the meaning of the transfer length field and whether fixed-
length or variable-length block(s) are to be transferred.
If the fixed bit is zero, a single block shall be transferred from the
initiator and shall be written to the logical unit beginning at the current
medium position. The transfer length specifies the length of the block to be
written (in bytes). The requested block length shall be within the minimum
and maximum block length range (returned by the READ BLOCK LIMITS command,
Section 9.2). If this condition is not met, a CHECK CONDITION status shall
be returned and the sense key shall be set to ILLEGAL REQUEST and no data
shall be written. Upon successful termination, the medium shall be positioned
after the block written by this command (end-of-medium side).
If the fixed bit is one, the transfer length field specifies the number of
block(s) to be transferred to the logical unit beginning at the current medium
position. This form of the WRITE command is valid only if the logical unit is
currently operating in fixed block mode (see 9.3). Upon termination, the
medium shall be positioned after the block(s) written by this command (end-of-
medium side)
The target may implement fixed block mode, variable block mode, or both
modes. If the fixed bit does not match the current mode, or the mode
indicated by the fixed bit is not implemented, the target shall reject the
command by returning a CHECK CONDITION status and by setting the sense key to
ILLEGAL REQUEST.
If the early warning end-of-medium condition is encountered while writing,
an attempt to finish writing any buffered data may be made. The command shall
terminate with a CHECK CONDITION status and the EOM bit in extended sense
shall be set to one. If any data remains in the target's buffer, then the
sense key shall be set to VOLUME OVERFLOW. If the fixed bit is one and the
logical unit is not buffered (buffered mode of the MODE SENSE command is
zero), then the valid bit in extended sense shall be set to one and the
information bytes shall be set to the difference (residue) between the
requested transfer length and the actual number of blocks written to the
medium. If the fixed bit is one and the logical unit is buffered (buffered
mode of the MODE SENSE command is one), then the valid bit shall be set to one
and the information bytes shall be set to the total number of blocks not
written (the number of blocks not transferred from the initiator plus the
number of blocks remaining in the target's buffer). Note that in this case it
is possible for the value in the information bytes to exceed the transfer
length.
When the transfer length is zero, no data shall be transferred and the
current position on the logical unit shall not be changed. This condition
shall not be considered as an error.
9.5 TRACK SELECT Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 0BH
Table 9-7
TRACK SELECT Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Track Value |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The TRACK SELECT command (Table 9-7) requests that the track specified in
the track value field be selected.
9.6 READ REVERSE Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 0FH
Table 9-8
READ REVERSE Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Fixed |
-----|-----------------------------------------------------------------------|
2 | Transfer Length (MSB) |
-----|-----------------------------------------------------------------------|
3 | Transfer Length |
-----|-----------------------------------------------------------------------|
4 | Transfer Length (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The READ REVERSE command (Table 9-8) functions identically to the READ
command except that medium motion is in the reverse direction. Thus, the
block(s) and bytes within the block(s) are transferred in the reverse order
and the medium position upon termination is before the last block read
(beginning-of-medium side). This command shall terminate with a CHECK
CONDITION status and the EOM bit in extended sense shall be set to one if
beginning-of-medium or load-point is encountered. The sense key shall be set
to NO SENSE. If the fixed bit is one, then the valid bit shall be set to one
and the information bytes shall contain the difference (residue) of the
requested transfer length and the actual number of blocks transferred before
beginning-of-medium or load-point was encountered.
Filemark handling is the same as in the READ command except that the medium
position upon command termination shall be before the filemark (beginning-of-
medium side).
If the transfer length is zero, no data shall be transferred and the current
position on the logical unit shall not be changed. This condition shall not
be considered as an error.
The target may implement fixed block mode, variable block mode, or both
modes. If the fixed bit does not match the current mode, or the mode
indicated by the fixed bit is not implemented, the target shall reject the
command by returning a CHECK CONDITION status and by setting the sense key to
ILLEGAL REQUEST.
9.7 WRITE FILEMARKS Command
Peripheral Device Type: Sequential Access
Operation Code Type: Mandatory
Operation Code: 10H
Table 9-9
WRITE FILEMARKS Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Number of Filemarks (MSB) |
-----|-----------------------------------------------------------------------|
3 | Number of Filemarks |
-----|-----------------------------------------------------------------------|
4 | Number of Filemarks (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The WRITE FILEMARKS command (Table 9-9) causes the specified number of
filemarks to be written beginning at the current medium position on the
logical unit. A zero in this field indicates that no filemarks are to be
written.
This command is also used to force any buffered data (see buffered mode in
the MODE SENSE command, Section 9.14) to be written. This command shall not
return a GOOD status unless all buffered data blocks and the filemarks (if
any) are correctly written on the medium.
If the early warning end-of-medium condition is encountered while writing,
an attempt to finish writing any buffered data may be made. The command shall
terminate with a CHECK CONDITION status and the EOM bit in extended sense
shall be set to one. If any filemarks remain to be written, then the sense
key shall be set to VOLUME OVERFLOW. If the logical unit is not buffered
(buffered mode of the MODE SENSE command is zero), then the valid bit in
extended sense shall be set to one and the information bytes shall be set to
the number of unwritten filemarks. If the logical unit is buffered (buffered
mode of the MODE SENSE command is one), then the valid bit shall be set to one
and the information bytes shall be set to the total number of blocks not
written (the number of unwritten filemarks plus the number of blocks remaining
in the target's buffer). Note that in this case it is possible for the value
in the information bytes to exceed the transfer length.
9.8 SPACE Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 11H
Table 9-10
SPACE Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Code |
-----|-----------------------------------------------------------------------|
2 | Count (MSB) |
-----|-----------------------------------------------------------------------|
3 | Count |
-----|-----------------------------------------------------------------------|
4 | Count (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The SPACE command (Table 9-10) provides a variety of positioning functions
that are determined by the code and count. Both forward (toward end-of-
medium) and reverse (toward beginning-of-medium) positioning are provided,
although some SCSI devices may only support a subset of this command. Such
SCSI devices shall return a CHECK CONDITION status and set the sense key to
ILLEGAL REQUEST in response to any attempt to invoke a function that is not
supported.
The code is defined as follows:
DB(1) DB(0) Description
----- ----- --------------------
0 0 Blocks
0 1 Filemarks
1 0 Sequential Filemarks
1 1 Physical End-of-Data
When spacing over blocks or filemarks, the count field specifies the number
of blocks or filemarks to be spaced over. A positive value N in the count
field shall cause forward medium movement over N blocks or filemarks ending on
the end-of-medium side of the last block or filemark. A zero value in the
count field shall cause no medium movement. A negative value -N (2's
complement notation) in the count field shall cause reverse medium movement
over N blocks or filemarks ending on the beginning-of-medium side of the last
block or filemark.
If a filemark is encountered while spacing over blocks, medium movement
shall be stopped. The medium shall be positioned on the end-of-medium side of
the filemark if movement was in the forward direction and on the beginning-of-
medium side of the filemark if movement was in the reverse direction. A CHECK
CONDITION status shall be sent to the initiator and the filemark and valid
bits in extended sense shall be set to one. The information bytes shall be
set to the difference (residue) in the requested count and the actual number
of blocks spaced over (not including the filemark).
If the physical end-of-medium is encountered while spacing forward over
blocks or filemarks, the target shall return a CHECK CONDITION status to the
initiator and shall set the end-of-medium (EOM) bit in extended sense to one.
The sense key shall be set to MEDIUM ERROR. The target shall set the valid
bit to one and the information bytes to the difference (residue) between the
requested count and the actual number of blocks or filemarks spaced over.
If beginning-of-medium or load-point is encountered while spacing over
blocks or filemarks in the reverse direction, the target shall return a CHECK
CONDITION status to the initiator and shall set the end-of-medium (EOM) bit in
extended sense to one. The sense key shall be set to NO SENSE. The target
shall set the valid bit to one and the information bytes to the difference
(residue) between the requested count and the actual number of blocks or
filemarks spaced over.
When spacing over sequential filemarks, the count field is interpreted as
follows:
(1) A positive value N shall cause forward medium movement to the first
occurrence of N or more consecutive filemarks stopping after the Nth filemark.
(2) A zero value shall cause no medium movement.
(3) A negative value -N (2's complement notation) shall cause reverse medium
movement to the first occurrence of N or more consecutive filemarks stopping
on the beginning-of-medium side of the Nth filemark.
When spacing to physical end-of-data, the count field is ignored. Forward
medium movement shall occur until the logical unit encounters physical end-of-
data as defined by the sequential-access device. Some sequential-access
devices define physical end-of-data as an erased area on the medium; however,
other definitions are not precluded. Targets that implement this function
shall leave the medium positioned such that a subsequent WRITE command would
append data to the last recorded information on the medium.
9.9 VERIFY Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 13H
Table 9-11
VERIFY Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | BytCmp | Fixed |
-----|-----------------------------------------------------------------------|
2 | Verification Length (MSB) |
-----|-----------------------------------------------------------------------|
3 | Verification Length |
-----|-----------------------------------------------------------------------|
4 | Verification Length (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The VERIFY command (Table 9-11) verifies one or more block(s) beginning with
the next block on the logical unit. The fixed bit specifies both the meaning
of the verification length field and whether fixed-length or variable-length
block(s) are to be verified.
A byte compare (BytCmp) bit of zero indicates that the verification shall be
simply a medium verification (CRC, ECC, etc). No data shall be transferred
between the initiator and target. A byte compare bit of one indicates that a
byte-by-byte compare of the data on the medium, and the data transferred from
the initiator shall be performed by the target. Data shall be transferred
from the initiator to the target as in a WRITE command.
A fixed bit of zero requests that the next block of the logical unit be
verified. The verification length specifies the number of bytes to verify. A
fixed bit of one requests verification length blocks be verified beginning
with the next logical block on the logical unit. This form of the VERIFY
command is only valid if the logical unit is currently in fixed block mode as
defined in the READ command. If the data does not compare (byte compare bit
equals one), the command shall terminate with a CHECK CONDITION status and the
sense key shall be set to MISCOMPARE. If the fixed bit is one, the valid bit
shall be set to one and the information bytes shall be set to the difference
(residue) between the verification length and the actual number of blocks
successfully verified. The medium shall be positioned after the block
containing the miscompare (end-of-medium side).
The target may implement fixed block mode, variable block mode, or both
modes. If the fixed bit does not match the current mode, or the mode
indicated by the fixed bit is not implemented, the target shall reject the
command by returning a CHECK CONDITION status and by setting the sense key to
ILLEGAL REQUEST.
The VERIFY command shall terminate when the verification length has been
satisfied, when a filemark is encountered, or when physical end-of-medium is
encountered. The status and sense data for each of these conditions are
handled the same as in the READ command. Upon completion of the VERIFY
command, the medium shall be positioned after the last block from which data
was verified or after the filemark, if encountered.
When the verification length is zero, no data shall be verified and the
current position on the logical unit shall not be changed. This condition
shall not be considered as an error.
9.10 RECOVER BUFFERED DATA Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 14H
Table 9-12
RECOVER BUFFERED DATA Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Fixed |
-----|-----------------------------------------------------------------------|
2 | Transfer Length (MSB) |
-----|-----------------------------------------------------------------------|
3 | Transfer Length |
-----|-----------------------------------------------------------------------|
4 | Transfer Length (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The RECOVER BUFFERED DATA command (Table 9-12) is used to read data that has
been transferred to an SCSI device buffer but has not been written on the
medium. It is normally only used to recover from error or exception
conditions that make it impossible to write the buffered data on the medium.
This command functions similarly to the READ command except that the data is
transferred from the SCSI device buffer instead of the medium. The order in
which block(s) are transferred is the same as if they would have been
transferred to the medium. One or more RECOVER BUFFERED DATA commands may be
used to read the unwritten buffered data.
The target may implement fixed block mode, variable block mode, or both
modes. If the fixed bit does not match the current mode, or the mode
indicated by the fixed bit is not implemented, the target shall reject the
command by returning a CHECK CONDITION status and by setting the sense key to
ILLEGAL REQUEST.
If an attempt is made to recover more logical blocks of data than are
contained in the SCSI device buffer, the command shall be terminated with a
CHECK CONDITION status. The EOM bit in extended sense shall be set to one.
If the fixed bit is one, the valid bit shall be set to one and the information
bytes shall be set to the difference (residue) between the requested transfer
length and the actual number of blocks transferred.
The transfer length specifies the number of contiguous logical blocks of
data to be transferred. A transfer length of zero indicates that no data
shall be transferred. This condition shall not be considered as an error.
9.11 MODE SELECT Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 15H
Table 9-13
MODE SELECT Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Parameter List Length |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The MODE SELECT command (Table 9-13) provides a means for the initiator to
specify medium, logical unit, or peripheral device parameters to the target.
The parameter list length specifies the length in bytes of the MODE SELECT
parameter list that shall be transferred during the DATA OUT phase. A zero
parameter list length indicates that no data shall be transferred. This
condition shall not be considered as an error.
The MODE SELECT parameter list shown in Table 9-14 contains a four-byte
header, followed by zero or more eight-byte block descriptors, followed by the
vendor unique parameters, if any.
Table 9-14
MODE SELECT Parameter List
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Reserved |
-----|-----------------------------------------------------------------------|
1 | Reserved |
-----|-----------------------------------------------------------------------|
2 |Reserved| Buffered Mode | Speed |
-----|-----------------------------------------------------------------------|
3 | Block Descriptor Length |
==============================================================================
| Block Descriptor(s) |
==============================================================================
0 | Density Code |
-----|-----------------------------------------------------------------------|
1 | Number of Blocks (MSB) |
-----|-----------------------------------------------------------------------|
2 | Number of Blocks |
-----|-----------------------------------------------------------------------|
3 | Number of Blocks (LSB) |
-----|-----------------------------------------------------------------------|
4 | Reserved |
-----|-----------------------------------------------------------------------|
5 | Block Length (MSB) |
-----|-----------------------------------------------------------------------|
6 | Block Length |
-----|-----------------------------------------------------------------------|
7 | Block Length (LSB) |
==============================================================================
| Vendor Unique Parameter(s) |
==============================================================================
0 _ n| Vendor Unique |
| Parameter Byte(s) |
==============================================================================
A buffered mode of zero indicates that the target shall not report a GOOD
status on WRITE commands until the data blocks are actually written on the
medium. A buffered mode of one indicates that the target may report a GOOD
status on WRITE commands as soon as the data block has been transferred to the
SCSI device buffer. One or more blocks may be buffered prior to writing the
block(s) to the medium. Buffered modes of 2H through 7H are reserved.
Code values for the speed field shall be assigned as follows:
0H Default (Use the peripheral device's default speed).
1H Use the peripheral device's lowest speed.
2H _ FH Use increasing peripheral device speeds.
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 the vendor unique parameters, if any. A block descriptor
length of zero indicates that no block descriptors are included in the
parameter list. This condition shall not be considered as an error.
Each block descriptor specifies the medium characteristics for all or part
of a logical unit. Each block descriptor contains a density code, a number of
blocks, and a block length.
Code values for the density code field are defined in Table 9-14.1.
Table 9-14.1
Sequential-access Density Codes
==============================================================================
Code Value Density
---------- ------------------------------------------------------------------
00H Default (peripheral device's default or only density)
Magnetic Tapes
Width Density Reference
mm. (Inch) Tracks BPMM (BPI) Code Type Standard Note
---------- ------ ------------ ---- ---- ------------ ----
01H 12.7 (0.5) 9 32 (800) NRZI R X3.22-1983 3
02H 12.7 (0.5) 9 63 (1 600) PE R X3.39-1973 3
03H 12.7 (0.5) 9 246 (6 250) GCR R X3.54-1976 3
04H 6.3 (0.25) 4/9 315 (8 000) GCR C 2,4
05H 6.3 (0.25) 4/9 315 (8 000) GCR C X3.136-198X 2
06H 12.7 (0.5) 9 126 (3 200) PE R X3B5/85-98 1,3
07H 6.3 (0.25) 4 252 (6 400) IMFM C X3.116-198X 2
08H 3.81 (0.15) 4 315 (8 000) GCR CS X3B5/85-77 1,2
09H 12.7 (0.5) 18 C X3B5/85-76 1,3
0AH 12.7 (0.5) 22 267 (6 667) MFM C 2
0BH 6.3 (0.25) 4 63 (1 600) PE C X3.56-198X 2
0CH 12.7 (0.5) 24 500 (12 690) GCR C 2
0DH 12.7 (0.5) 24 999 (25 380) GCR C 2
80H _ FFH Vendor unique
All others Reserved
==============================================================================
Key:
Code Type
-------------------------------------------- -----------------------
NRZI Non Return to Zero, change on ones R Reel-to-Reel
GCR Group Code Recording C Cartridge
PE Phase Encoded CS Cassette
IMFM Inverted Modified Frequency Modulation
NOTES:
(1) Working Draft. X3B5 assigns a new document number to each revision of
their documents. Please contact the Chairman of X3B5 for the latest document
number.
(2) Serially Recorded.
(3) Parallel Recorded.
(4) Old format known as QIC-11.
The number of blocks field specifies the number of logical blocks on the
medium that meet the density code and block length in the block descriptor. A
number of blocks of zero indicates that all of the remaining logical blocks of
the logical unit shall have the medium characteristics specified by the block
descriptor.
The block length specifies the length in bytes of each logical block
described by the block descriptor. A block length of zero indicates that the
length shall be variable.
9.12 RESERVE UNIT and RELEASE UNIT Commands
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 16H and 17H, respectively
Table 9-15
RESERVE UNIT and RELEASE UNIT Commands
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | 3rdPty | Third Party Device ID |Reserved|
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Reserved |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The RESERVE UNIT and RELEASE UNIT commands both use the command descriptor
block shown in Table 9-15.
9.12.1 RESERVE UNIT Command. The RESERVE UNIT command (Table 9-15,
operation code 16H) shall reserve the specified logical unit for the exclusive
use by the requesting initiator or, if third-party reservation option is
implemented, to another specified SCSI device.
The reservation shall remain in effect until superceded by another RESERVE
UNIT command from the initiator that made the reservation or until released by
a RELEASE UNIT command from the same initiator, or a BUS DEVICE RESET message
from any initiator, or a "hard" RESET condition. The occurrence of the last
two conditions is indicated by a sense key of UNIT ATTENTION on the next
command following the condition. It is not an error to issue this command to
a logical unit that is currently reserved to the requesting initiator.
If the logical unit is previously reserved by another initiator, then the
target shall either:
(1) return a RESERVATION CONFLICT status
(2) queue the reservation request and disconnect until all previously
queued reservations have been released. When the logical unit is available,
the target shall reconnect to perform the reservation
If, after honoring the reservation, any other initiator then subsequently
attempts to perform any command on the reserved logical unit other than a
RESERVE UNIT command, which may be queued, or a RELEASE UNIT command, which
shall be ignored, then the command shall be rejected with a RESERVATION
CONFLICT status.
The third-party reservation option for the RESERVE UNIT command allows an
initiator to reserve a logical unit for another SCSI device. This option is
intended for use in multiple-initiator systems that use the COPY command. Any
target that implements the third-party reservation option shall also implement
the third-party release option (see 9.12.2).
If the third-party (3rdPty) bit is zero, then the third-party reservation
option is not requested. If the 3rdPty bit is one and the third-party
reservation option is implemented, then the RESERVE UNIT command shall reserve
the specified logical unit for the SCSI device specified in the third-party
device ID field. The target shall preserve the reservation until superceded
by another RESERVE UNIT command from the initiator that made the reservation
or until released by the same initiator, by a BUS DEVICE RESET message from
any initiator, or by a "hard" RESET condition. The target shall ignore (i.e.,
return GOOD status) any attempt made by any other initiator to release the
reservation.
If the 3rdPty bit is one and the third-party reservation option is not
implemented, then the target shall reject the RESERVE UNIT command with a
CHECK CONDITION status and a sense key of ILLEGAL REQUEST.
An initiator that holds a current reservation may modify that reservation
(e.g., switch third-parties) by issuing another RESERVE UNIT command to the
same logical unit. The superceding RESERVE UNIT command shall release the
previous reservation state only when the new reservation is granted. A
superceding reservation takes priority over any previously queued reservation
request.
9.12.2 RELEASE UNIT Command. The RELEASE UNIT command (Table 9-15,
operation code 17H) shall release the logical unit if it is currently reserved
by the requesting initiator.
It is not an error to attempt to release a logical unit that is not
currently reserved to the requesting initiator. However, it shall not be
released if it is reserved by another initiator.
The third-party release option for the RELEASE UNIT command allows an
initiator to release a logical unit that was previously reserved using the
third-party reservation option (see 9.12.1). This option shall be implemented
if the third-party reservation option is implemented. This option is intended
for use in multiple-initiator systems that use the COPY command.
If the third-party (3rdPty) bit is zero, then the third-party release option
is not requested. If the 3rdPty bit is one and the target implements the
third-party release option, then the target shall release the specified
logical unit, but only if the reservation was made using the third-party
reservation option by the initiator that is requesting the release and for the
same SCSI device as specified in the third-party device ID field.
If the 3rdPty bit is one and the target does not implement the third-party
release option, then the target shall terminate the command with a CHECK
CONDITION status and the sense key shall be set to ILLEGAL REQUEST.
9.13 ERASE Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 19H
Table 9-16
ERASE Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Long |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Reserved |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The ERASE command (Table 9-16) causes part or all of the remaining medium to
be erased beginning from the current medium position. As used here, "erased"
means either the medium shall be erased or a pattern shall be written on the
medium that appears as gap to the target.
The distance to be erased is controlled by the long bit. A long bit of one
indicates that all remaining medium on the logical unit shall be erased. A
long bit of zero indicates that a peripheral device specified portion of the
medium shall be erased. Normally, short erases are used to create an extended
gap for software controlled error recovery or for support of "update in place"
functions. The medium position following an ERASE command with a long bit of
one is not defined by this standard.
NOTE: Some targets may reject ERASE commands with the long bit set to one if
the medium is not positioned at the beginning-of-medium.
9.14 MODE SENSE Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 1AH
Table 9-17
MODE SENSE Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Allocation Length |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The MODE SENSE command (Table 9-17) provides a means for a target to report
its medium, logical unit, or peripheral device parameters to the initiator.
It is a complementary command to the MODE SELECT command (see 9.11) for
support of a medium that may contain different densities, such as half-inch
tapes.
The allocation length specifies the number of bytes that the initiator has
allocated for returned MODE SENSE data. An allocation length of zero
indicates that no MODE SENSE data shall be transferred. This condition shall
not be considered as an error. Any other value indicates the maximum number
of bytes that shall be transferred. The target shall terminate the DATA IN
phase when allocation length bytes have been transferred or when all available
MODE SENSE data have been transferred to the initiator, whichever is less.
The MODE SENSE data (Table 9-18) contains a four-byte header, followed by
zero or more eight-byte block descriptors, followed by the vendor unique
parameters, if any.
Table 9-18
MODE SENSE Data
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Sense Data Length |
-----|-----------------------------------------------------------------------|
1 | Medium Type |
-----|-----------------------------------------------------------------------|
2 | WP | Buffered Mode | Speed |
-----|-----------------------------------------------------------------------|
3 | Block Descriptor Length |
==============================================================================
| Block Descriptor(s) |
==============================================================================
0 | Density Code |
-----|-----------------------------------------------------------------------|
1 | Number of Blocks (MSB) |
-----|-----------------------------------------------------------------------|
2 | Number of Blocks |
-----|-----------------------------------------------------------------------|
3 | Number of Blocks (LSB) |
-----|-----------------------------------------------------------------------|
4 | Reserved |
-----|-----------------------------------------------------------------------|
5 | Block Length (MSB) |
-----|-----------------------------------------------------------------------|
6 | Block Length |
-----|-----------------------------------------------------------------------|
7 | Block Length (LSB) |
==============================================================================
| Vendor Unique Parameter(s) |
==============================================================================
0 _ n| Vendor Unique |
| Parameter Byte(s) |
==============================================================================
The sense data length specifies the length in bytes of the following mode
sense data that is available to be transferred during the DATA IN phase. The
sense data length does not include itself.
Code values for the medium type field shall be assigned as follows:
00H Default (Only one medium type supported)
01H _ 7FH Reserved
80H _ FFH Vendor unique
A write protected (WP) bit of zero indicates that the medium is write
enabled. A write protected bit of one indicates that the medium is write
protected.
A buffered mode of zero indicates that the target does not report a GOOD
status on WRITE commands until the data blocks are actually written on the
medium. A buffered mode of one indicates that the target may report a GOOD
status on WRITE commands as soon as the data block has been transferred to the
SCSI device buffer. One or more blocks may be buffered prior to writing the
block(s) to the medium. Buffered modes of 2H through 7H are reserved.
Code values for the speed field shall be assigned as follows:
0H Default (only one speed supported)
1H Lowest peripheral device speed
2H _ FH Increasing peripheral device speeds
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 the vendor unique parameters, if any. A block descriptor
length of zero indicates that no block descriptors shall be included in the
parameter list. This condition shall not be considered as an error.
Each block descriptor specifies the medium characteristics for all or part
of a logical unit. Each block descriptor contains a density code, a number of
blocks, and a block length.
Code values for the density code field are defined in Table 9-14.1.
The number of blocks field specifies the number of logical blocks on the
medium that meet the density code and block length in the block descriptor. A
number of blocks of zero indicates that all of the remaining logical blocks of
the logical unit have the medium characteristics specified by the block
descriptor.
The block length specifies the length in bytes of each logical block
described by the block descriptor. A block length of zero indicates that the
length is variable.
9.15 LOAD/UNLOAD Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 1BH
Table 9-19
LOAD/UNLOAD Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Immed |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Reserved | Re-Ten | Load |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The LOAD/UNLOAD command (Table 9-19) requests that the target enable or
disable the logical unit for further operations. This command may also be
used to request the re-tension function on peripheral devices that support
this function.
A load bit of one indicates that the medium on the logical unit shall be
loaded and positioned to the beginning-of-medium or load-point as determined
by the peripheral device. A load bit of zero indicates that the medium on the
logical unit shall be positioned for removal from the peripheral device.
Status shall be returned after the medium is positioned unless the immediate
(Immed) bit is one. If the Immed bit is one, status may be returned as soon
as the command has been accepted.
A re-tension (Re-Ten) bit of one indicates that the medium on the addressed
logical unit shall be correctly tensioned before the LOAD/UNLOAD command is
completed. This is an optional function intended for use by those peripheral
devices that support the re-tension function.
9.16 PREVENT/ALLOW MEDIUM REMOVAL Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 1EH
Table 9-20
PREVENT/ALLOW MEDIUM REMOVAL Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Reserved | Prevent|
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The PREVENT/ALLOW MEDIUM REMOVAL command (Table 9-20) requests that the
target enable or disable the removal of the medium in the logical unit.
A prevent bit of one shall inhibit mechanisms that normally allow removal of
the medium. A prevent bit of zero shall allow removal of the medium.
This prevention of medium removal condition shall terminate upon receipt of
a PREVENT/ALLOW MEDIUM REMOVAL command with the prevent bit set to zero, or by
the receipt of a BUS DEVICE RESET message from any initiator or by a "hard"
RESET condition.
11. Group 0 Command Descriptions for Processor Devices
The Group 0 commands for processor devices shall be as shown in Table 11-1.
Table 11-1
Group 0 Commands for Processor Devices
==============================================================================
Operation
Code Type Command Name Section
------------------------------------------------------------------------------
00H O TEST UNIT READY 7.1.1
01H V
02H V
03H M REQUEST SENSE 7.1.2
04H V
05H V
06H V
07H V
08H O RECEIVE 11.1
09H V
0AH M SEND 11.2
0BH V
0CH V
0DH V
0EH V
0FH V
10H V
11H V
12H E INQUIRY 7.1.3
13H V
14H V
15H V
16H V
17H V
18H O COPY 7.1.4
19H R
1AH R
1BH R
1CH O RECEIVE DIAGNOSTIC RESULTS 7.1.5
1DH O SEND DIAGNOSTIC 7.1.6
1EH R
1FH R
==============================================================================
Key: M = Command implementation is mandatory.
E = Command implementation is required for SCSI devices that support
device-independent self-configuring software.
O = Command implementation is optional.
R = Operation code is reserved for future standardization.
V = Operation code is available for vendor unique commands.
11.1 RECEIVE Command
Peripheral Device Type: Processor Devices
Operation Code Type: Optional
Operation Code: 08H
Table 11-2
RECEIVE Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Allocation Length (MSB) |
-----|-----------------------------------------------------------------------|
3 | Allocation Length |
-----|-----------------------------------------------------------------------|
4 | Allocation Length (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The RECEIVE command (Table 11-2) transfers data from the target to the
initiator.
The allocation length specifies the number of bytes that the initiator has
allocated for the returned data. An allocation length of zero indicates that
no data shall be transferred. This condition shall not be considered as an
error. Any other value indicates the maximum number of bytes that shall be
transferred. The target shall terminate the DATA IN phase when allocation
length bytes have been transferred or when all available data have been
transferred to the initiator, whichever is less.
11.2 SEND Command
Peripheral Device Type: Processor Devices
Operation Code Type: Mandatory
Operation Code: 0AH
Table 11-3
SEND Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Transfer Length (MSB) |
-----|-----------------------------------------------------------------------|
3 | Transfer Length |
-----|-----------------------------------------------------------------------|
4 | Transfer Length (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The SEND command (Table 11-3) transfers data from the initiator to the
target.
The transfer length specifies the length in bytes of data that shall be sent
during the DATA OUT phase. A transfer length of zero indicates that no data
shall be sent. This condition shall not be considered as an error.
13. Command Descriptions for Read-Only Direct-Access Devices
13.1 Group 0 Commands for Read-Only Direct-Access Devices. The Group 0
commands for read-only direct-access devices shall be as shown in Table 13-1.
Table 13-1
Group 0 Commands for Read-Only Direct-Access Devices
==============================================================================
Operation
Code Type Command Name Section
------------------------------------------------------------------------------
00H O TEST UNIT READY 7.1.1
01H O REZERO UNIT 8.1.1
02H V
03H M REQUEST SENSE 7.1.2
04H R
05H V
06H V
07H R
08H O READ 12.1.1
09H V
0AH R
0BH O SEEK 8.1.6
0CH V
0DH V
0EH V
0FH V
10H V
11H V
12H E INQUIRY 7.1.3
13H V
14H V
15H O MODE SELECT 12.1.3
16H O RESERVE 8.1.8
17H O RELEASE 8.1.9
18H O COPY 7.1.4
19H V
1AH O MODE SENSE 12.1.4
1BH O START/STOP UNIT 8.1.11
1CH O RECEIVE DIAGNOSTIC RESULTS 7.1.5
1DH O SEND DIAGNOSTIC 7.1.6
1EH O PREVENT/ALLOW MEDIUM REMOVAL 8.1.12
1FH R
==============================================================================
Key: M = Command implementation is mandatory.
E = Command implementation is required for SCSI devices that support
device-independent self-configuring software.
O = Command implementation is optional.
R = Operation code is reserved for future standardization.
V = Operation code is available for vendor unique commands.
13.2 Group 1 Commands for Read-Only Direct-Access Devices. The Group 1
commands for read-only direct-access devices shall be as shown in Table 13-2.
Table 13-2
Group 1 Commands for Read-Only Direct-Access Devices
==============================================================================
Operation
Code Type Command Name Section
------------------------------------------------------------------------------
20H V
21H V
22H V
23H V
24H V
25H E READ CAPACITY 8.2.1
26H V
27H V
28H M READ 12.2.1
29H V
2AH R
2BH O SEEK 8.2.4
2CH V
2DH V
2EH R
2FH O VERIFY 12.2.4
30H O SEARCH DATA HIGH 8.2.7.1
31H O SEARCH DATA EQUAL 8.2.7.2
32H O SEARCH DATA LOW 8.2.7.3
33H O SET LIMITS 8.2.8
34H R
35H R
36H R
37H R
38H R
39H O COMPARE 7.2.1
3AH O COPY AND COMPARE 7.2.2
3BH R
3CH R
3DH R
3EH R
3FH R
==============================================================================
Key: M = Command implementation is mandatory.
E = Command implementation is required for SCSI devices that support
device-independent self-configuring software.
O = Command implementation is optional.
R = Operation code is reserved for future standardization.
V = Operation code is available for vendor unique commands.
14. Status
A status byte shall be sent from the target to the initiator during the STATUS
phase at the termination of each command as specified in Tables 14-1 and 14-2
unless the command is cleared by an ABORT message, by a BUS DEVICE RESET
message, or by a "hard" RESET condition.
Table 14-1
Status Byte
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 |Reserved| Vendor Unique | Status Byte Code | V |
==============================================================================
Table 14-2
Status Byte Code Bit Values
==============================================================================
Bits of Status Byte
-----------------------------
7 6 5 4 3 2 1 0 Status(es) Represented
------------------------------------------------------------------------------
R V V 0 0 0 0 V GOOD
R V V 0 0 0 1 V CHECK CONDITION
R V V 0 0 1 0 V CONDITION MET/GOOD
R V V 0 0 1 1 V Reserved
R V V 0 1 0 0 V BUSY
R V V 0 1 0 1 V Reserved
R V V 0 1 1 0 V Reserved
R V V 0 1 1 1 V Reserved
R V V 1 0 0 0 V INTERMEDIATE/GOOD
R V V 1 0 0 1 V Reserved
R V V 1 0 1 0 V INTERMEDIATE/CONDITION MET/GOOD
R V V 1 0 1 1 V Reserved
R V V 1 1 0 0 V RESERVATION CONFLICT
R V V 1 1 0 1 V Reserved
R V V 1 1 1 0 V Reserved
R V V 1 1 1 1 V Reserved
==============================================================================
Key: R - Reserved bit
V - Vendor unique bit
A description of the status byte codes is given below:
GOOD. This status indicates that the target has successfully completed the
command.
CHECK CONDITION. Any error, exception, or abnormal condition that causes
sense data to be set, shall cause a CHECK CONDITION status. The REQUEST SENSE
command should be issued following a CHECK CONDITION status, to determine the
nature of the condition.
CONDITION MET. The SEARCH DATA commands shall return this status whenever a
search condition is satisfied. This status does not break a chain of linked
commands. The logical block address of the logical block that satisfies the
search may be determined with a REQUEST SENSE command.
BUSY. The target is busy. This status shall be returned whenever a target is
unable to accept a command from an initiator. The normal initiator recovery
action is to issue the command again at a later time.
INTERMEDIATE. This status shall be returned for every command in a series of
linked commands (except the last command), unless an error, exception, or
abnormal condition causes a CHECK CONDITION status or a RESERVATION CONFLICT
status to be set. If this status is not returned, the chain of linked
commands is broken; no further commands in the series are executed.
RESERVATION CONFLICT. This status shall be returned whenever an SCSI device
attempts to access a logical unit or an extent within a logical unit that is
reserved for that type of access to another SCSI device.
Appendixes (These Appendixes are not part of American National Standard
Small Computer System Interface, X3.131.198_, but are included
for information only.)
Appendix A
SCSI Signal Sequence Example
This appendix is included to provide an example of the timing of an SCSI
command that includes most of the SCSI bus phases (Figure A1). In this
example, the target does not disconnect from the SCSI bus prior to completing
the command.
The following notes apply to Figure A1:
GENERAL NOTE:
In a typical system, the computer's host adapter acts as the "initiator" and
the peripheral device's controller acts as the "target". In general, this
standard does not attempt to distinguish between a computer and its host
adapter. These functions may be separate or merged. The term "initiator"
encompasses both. Similarly, the term "target" does not distinguish between
the peripheral device and its controller, which may be separate or merged.
The term "SCSI device" refers to a device that may be connected to the SCSI
bus. An SCSI device may act as in the initiator role, the target role, or
both roles.
TIMING NOTES:
Bus Settle Delay. The minimum time to wait for the SCSI bus to settle after
changing certain control signals.
Bus Free Delay. The minimum time that an SCSI device must wait from its
detection of BUS FREE phase until it may assert BSY and its ID bit.
Bus Set Delay. The maximum time that an SCSI device may wait to assert BSY
and its ID bit after BUS FREE phase was last detected if it intends to
participate in the ARBITRATION phase.
Bus Clear Delay. The maximum time for an SCSI device to stop driving all
signals after BUS FREE phase is detected, after SEL is received during
ARBITRATION phase, or after RST becomes true.
Arbitration Delay. The minimum time that an SCSI device must wait after
asserting BSY for arbitration until it may examine the DATA BUS to determine
whether it won. There is no maximum time.
DATA BUS NOTES:
(1) DB(7) is the most significant bit.
(2) DB(7) is the highest priority arbitration bit.
(3) DB(P) is the data parity bit (odd). Parity is not valid during the
ARBITRATION phase. Use of parity is a system option (i.e., a system is
configured so that all SCSI devices on a bus generate parity and have parity
detection enabled, or all SCSI devices have parity detection disabled or not
implemented).
BUS PHASE NOTES:
BUS FREE phase. BUS FREE phase begins when SEL and BSY are both continuously
false for a bus settle delay. It ends when SEL or BSY becomes true.
ARBITRATION phase. Implementation of this phase is optional. If there is
more than one initiator, then all initiators must implement this phase.
Targets that do not implement this phase cannot disconnect from the bus until
the command has completed. SCSI devices that implement the COPY command must
implement ARBITRATION phase.
At least one bus free delay after first detecting BUS FREE phase, but no
more than a bus set delay after the bus was last free, the initiator asserts
BSY and its assigned SCSI device ID bit on the DATA BUS. The initiator waits
an arbitration delay, then examines the DATA BUS. If a higher priority SCSI
device ID bit is true, the initiator loses arbitration and releases BSY and
its ID bit. Otherwise, the initiator wins arbitration and asserts SEL. SCSI
devices must release BSY and their ID bit within a bus clear delay after SEL
becomes true (even if they have not yet examined the DATA BUS).
The winning SCSI device waits at least a bus clear delay plus a bus settle
delay after asserting SEL before changing any signals on the bus.
SELECTION phase. The I/O signal is false during this phase to distinguish it
from the RESELECTION phase.
NON-ARBITRATING SYSTEMS: In such systems, the initiator waits at least a
bus clear delay after detecting BUS FREE phase, then it asserts the target's
ID bit and, optionally, the initiator's ID bit on the DATA BUS. After at
least two deskew delays, the initiator asserts SEL.
ARBITRATING SYSTEMS: In such systems, the SCSI device that won arbitration
has both BSY and SEL asserted. After at least a bus clear delay plus a bus
settle delay, it places both the target's and the initiator's ID bits on the
DATA BUS. At least two two deskew delays later, it releases BSY.
ALL SYSTEMS: The target determines that it is selected when SEL and its
SCSI ID bit are true and BSY and I/O are false for at least a bus settle
delay. The target then asserts BSY within a selection abort time after it
last determined that it was still being selected. (The target is not required
to respond to a selection within a selection abort time; but it must insure
that it will not assert BSY more than a selection abort time after the
initiator aborts a selection attempt.)
At least two deskew delays after the initiator detects BSY true, it releases
SEL and may change or release the DATA BUS.
COMMAND phase. The target asserts C/D and negates I/O and MSG for all of the
bytes transferred during this phase. The direction of transfer is from the
initiator to the target.
HANDSHAKE PROCEDURE: The target asserts REQ. Upon detecting REQ true, the
initiator drives the DATA BUS to the desired value, waits at least one deskew
delay plus a cable skew delay and then asserts ACK. The initiator continues
to drive the DATA BUS until REQ is false.
When ACK is true at the target, the target reads the DATA BUS and then
negates REQ.
When REQ becomes false at the initiator, the initiator may change or release
the DATA BUS and negate ACK.
The target may continue to request command bytes by asserting REQ again.
The number of command bytes is determined by the group code (most significant
3 bits) that is contained in the first command byte.
DATA IN phase. The target asserts I/O and negates C/D and MSG for all of the
bytes transferred during this phase. The direction of transfer is from the
target to the initiator.
HANDSHAKE PROCEDURE: The target first drives the DATA BUS to their desired
values, waits at least one deskew delay plus a cable skew delay, and then
asserts REQ. The target continues to drive the DATA BUS until ACK is true.
When REQ is true at the initiator, the initiator reads the DATA BUS and then
asserts ACK.
When ACK is true at the target, the target may change or release the DATA
BUS and negate REQ.
When REQ is false at the initiator, the initiator negates ACK. After ACK is
false, the target may continue the transfer by driving the DATA BUS and
asserting REQ as described above.
DATA OUT phase (not shown in the figure). The target negates C/D, I/O, and
MSG for all of the bytes transferred during this phase. The direction of
transfer is from the initiator to the target. (Refer to the handshake
procedure and the timing chart for the COMMAND phase.)
STATUS phase. The target asserts C/D and I/O and negates MSG for the byte
transferred during this phase. The direction of transfer is from the target
to the initiator. (Refer to the handshake procedure and the timing chart for
the DATA IN phase.)
MESSAGE phase. The target C/D, I/O, and MSG during the byte transferred
during this phase. Typically, a COMMAND COMPLETE message would be sent at
this point. The direction of transfer is from the target to the initiator.
(Refer to the handshake procedure and the timing chart for the DATA IN phase.)
BUS FREE phase. The target returns to BUS FREE phase by releasing BSY. Both
the target and the initiator release all bus signals within a bus clear delay
after BSY is continuously false for a bus settle delay.
Appendix B
Typical Bus Phase Sequence
This appendix is included to provide an example of the SCSI bus phase sequence
for a typical READ command (Tables B1 and B2). In this example, the target
does not disconnect from the SCSI bus prior to completing the command.
Table B1
Typical READ Command Phase Sequence
==============================================================================
Signals
---------------------------------------------------------------
B S A M C I R A R D D
S E T S / / E C S B B
Bus Phase Y L N G D O Q K T (7-0) (P) Comment
------------------------------------------------------------------------------
BUS FREE - - - - - - - - - - - SCSI bus is available.
ARBITRATION 1 - - - - - - - - ID X Initiator tries to get
" 1 the SCSI bus.
SELECTION 1 1 1 - - - - 0 - ID I,T V Initiator has SCSI bus
" - 1 ID I,T V and selects a target.
" 1 1 ID I,T V ATN is on.
" 1 - X X
MESSAGE OUT 1 - 1 1 1 0 0 0 - X X Target has control of
" 1 1 0 X X the bus and gets the
" 1 1 0 X X IDENTIFY message from
" 1 1 1 Message V the initiator.
" 1 0 1 X X
" 0 0 0 X X
COMMAND 1 - 0 0 1 0 0 0 - X X Target gets a command
" 1 0 X X from the initiator.
" 1 1 Command V (This phase is repeated
" 0 1 X X for each byte.)
" 0 0 X X
==============================================================================
Table B2
Typical READ Command Phase Sequence (Continued)
==============================================================================
Signals
---------------------------------------------------------------
B S A M C I R A R D D
S E T S / / E C S B B
Bus Phase Y L N G D O Q K T (7-0) (P) Comment
------------------------------------------------------------------------------
DATA IN 1 - 0 0 0 1 0 0 - X X Target sends data to
" 1 0 Read Data V the initiator. (This
" 1 1 X X phase is repeated for
" 0 1 X X each byte.)
" 0 0 X X
STATUS 1 - 0 0 1 1 0 0 - X X Target sends status to
" 1 0 Status V the initiator.
" 1 1 X X
" 0 1 X X
" 0 0 X X
MESSAGE IN 1 - 0 1 1 1 0 0 - X X Target sends a COMMAND
" 1 0 Message V COMPLETE message to the
" 1 1 X X initiator.
" 0 1 X X
" 0 0 X X
BUS FREE - - - - - - - - - - - SCSI bus is available.
==============================================================================
Key: - = Signal driver is passive.
0 = Signal is false.
1 = Signal is true.
"Blank" = Signal state is the same as the previous line.
ID = SCSI ID for arbitration.
ID I,T = SCSI ID of initiator and target.
V = Parity is valid.
X = The signal is not guaranteed to be in a known state.
Appendix C
SCSI System Operation
This appendix is included to provide an explanation of the relationship of the
various pieces of an SCSI system. This appendix also provides additional
information about the use of SCSI in a multi-tasking system. Such systems
typically use a host adapter printed-circuit board to interface from the host
memory to the SCSI bus. Although other architectures are possible (including
native or imbedded SCSI), the host adapter logic still exists as part of the
system. The term "initiator" is used throughout this standard to encompass
all such architectures. The term "host adapter" is used within this appendix
to refer to the logic that interfaces from the host memory to the SCSI bus.
C1. Host Memory / Host Adapter / SCSI Controller Relationship
The SCSI architecture utilizes the concept of host memory blocks for command,
data, and status interchange between the host system and the SCSI controller.
In the middle of this exchange is the SCSI host adapter, which acts as the
SCSI peripheral's gateway into host memory. The host adapter is an important
portion of the overall intelligence of SCSI. Along with providing an
information path from the SCSI bus to the host bus, the host adapter is
intimately involved in assuring data integrity and proper performance of the
I/O subsystem.
In order to fully understand SCSI operation, the concepts of I/O memory
blocks and logical threads must be detailed. Figure C1 presents a block
diagram of a single host/single peripheral SCSI I/O subsystem. The host
memory contains three I/O blocks: command, data, and status. The SCSI
controller needs to read the command block and write to the status block in
order to perform the task specified by the host (in the command block).
Likewise, the controller needs to both read and write the data block. As was
previously mentioned, the SCSI controller "reaches into host memory" via the
SCSI host adapter. The host adapter must know the addresses of the command,
data, and status blocks in order for it to "reach" into the right spot in
memory. In other words, the host adapter must be given a pointer to the start
of each block by the host. As the SCSI controller takes information from the
command block, the memory pointer for the command block advances to the
next byte. The same is true for the data and status pointers.
SCSI architecture provides for two sets of three pointers within the host
adapter. The first set is known as the current (or active) pointer values.
These are the pointers to the next command, data, or status byte to be
transferred between the host memory and the SCSI controller. There is only
one set of current pointers in the host adapter. The current pointers are
shared amoung all devices and are used by the current device connected to the
host adapter. The second set is known as the saved pointer values. There is
one set of saved pointers for each supported logical thread. For command and
status, these pointers always point to the start of the memory command block
and memory status block. The saved data pointer points to the start of the
data block at the beginning of the SCSI command. It remains at this value
until the controller sends a SAVE DATA POINTER message to the host adapter
which in turn saves the value of the current data pointer. The controller may
retrieve the saved value by sending a RESTORE POINTERS message. This moves
the saved value of each pointer into the current pointer registers. Whenever
an SCSI device disconnects from the bus, only the saved pointer values are
retained. The current pointer values are set from the saved values upon the
next reconnection. The current and saved pointers provide an efficient means
of error retry and recovery during large data exchanges on the SCSI bus.
C2. SCSI READ Command Example
One method to understanding the host/host adapter/SCSI peripheral relationship
is via an example. Let us consider the case of a multiple sector READ command
that will cross a cylinder boundary on a direct-access device such as a disk.
The first activity in the I/O operation is for the system to create a
command descriptor block in memory and determine where the data and status are
to be written in host memory. The host then sends a command to the host
adapter that includes the starting address (pointer) for each of the command,
data, and status blocks and the SCSI address of the peripheral to perform the
operation. In this example, there is only one SCSI controller and physical
disk, but its address is required in order for the host adapter to select it.
Upon receiving the command, the host adapter arbitrates for the SCSI bus and
wins (due to the lack of competing devices) and proceeds to select the target
SCSI device with the ATN signal asserted. The ATTENTION condition indicates
to the SCSI target that the initiator (the host adapter) has a message to send
to the target.
After the SELECTION phase is completed, the disk controller responds to the
initiator's ATTENTION condition by receiving a message from the initiator.
This message, generated by the host adapter, indicates the desired logical
unit number in the target and whether the initiator can support bus
disconnect. In this example, the initiator supports disconnect.
Input/output activity from this point will be controlled entirely by the
target. The host adapter is simply an "arm" of the target used to reach into
host memory. Utilizing this arm, the target reads in the command descriptor
block (CDB).
After decoding the instruction, the controller determines that a disk seek
is required to get the starting data block. Since the SCSI bus will not be
utilized until data has been read from the disk, the target controller
disconnects from the bus. The disconnect process includes the transmission of
a SAVE DATA POINTER message and DISCONNECT message from the target to the host
adapter. The host adapter responds to the SAVE DATA POINTER message by saving
the current data pointer, which is still set to the start of the data block.
After transmission of the DISCONNECT message the target will release BSY,
freeing the bus.
Although the initiator host adapter and target disk controller are
disconnected, they are logically connected or, "threaded", together. Both
devices know they have a command to finish and will return to that job at a
later point in time. The principle of logical threads allows many I/O
commands to execute in the system simultaneously, utilizing a single physical
bus. The thread is actually not between the host adapter and the disk
controller, but runs all the way from the host memory I/O block to the
peripheral device performing the operation. (See Figure C2 for a pictorial
presentation of this concept.)
Once the target has started filling its data buffers, it can transmit data
to the initiator, but first it must reestablish the physical path. The
reselection process involves the target arbitrating for the bus and
reselecting the host adapter. After the physical reconnection is made, the
target sends an IDENTIFY message to the host adapter to indicate which target
logical unit is reconnecting. This information provides reconnection, to the
correct thread into host memory. After reconnection, the roles of the
initiator and target are just as they were prior to disconnect. The target
transfers data into host memory via the host adapter. The data transfer
continues until the disk reaches the end of its cylinder and the disk
controller determines that a second physical seek is required to complete the
READ command. The target again performs a SAVE DATA POINTER message and a
DISCONNECT message. However, this time the current data pointer is not at the
beginning of the memory data block. The saved value at disconnect reflects
the change.
After seek completion and transfer of data into its buffer, the controller
reconnects to the host adapter and completes the data transfer as requested by
the READ command. At this point, the controller sends ending status into host
memory via the host adapter. The final action of the target is to send to the
host adapter a COMMAND COMPLETE message and disconnect from the SCSI bus. The
target has completed its operation and considers the logical thread broken.
Upon receipt of the COMMAND COMPLETE message, the host adapter signals the
host that the I/O command is complete. This signal can be an interrupt or the
setting of a flag read by the host in a polled I/O environment. This action
by the host adapter breaks the thread between the host adapter and the I/O
memory blocks of the host. The host reviews the status of the operation in
the status block and proceeds to utilize the data transferred into the data
block.
C3. I/O Channel Concept
The I/O channel concept fully utilizes the high performance capability of
SCSI. The I/O channel is basically an intelligent SCSI host adapter that can
maintain multiple simultaneous threads between host memory I/O blocks and
different SCSI devices.
The I/O channel utilizes a single direct memory access (DMA) path into host
memory supporting the DMA operations of numerous SCSI peripherals. Since the
SCSI bus is a single physical bus and most host computers have a single
physical backplane bus, multiple DMA channels into memory are not necessary.
In many implementations of a multiple DMA channel architecture, when a channel
is accessing memory, all other channels are idle. In such implementations, a
single channel supporting multiple threads can supply the same performance as
separate DMA peripherals. An obvious advantage to the host is lower system
cost as well as the saving in backplane card slots.
In the READ command example discussed in Section C2, the I/O channel is the
SCSI host adapter. The host gives the I/O channel a command by providing it
with pointers to the I/O memory blocks and the SCSI peripheral address. This
establishes a thread between the host adapter and the host I/O memory blocks.
The I/O channel then opens a subchannel that is assigned the task of managing
the physical link and logical thread between the host adapter and the target
controller. All physical connections and reconnections to the host adapter
are managed by this subchannel. The number of active or open subchannels an
I/O channel can support is totally dependent upon its design. The SCSI
definition could, in theory, support an I/O channel with up to 56 subchannels
(14,336 subchannels, if the EXTENDED IDENTIFY message is implemented).
Appendix D
Recommended Shielded Connectors
Three alternative shielded connector systems are defined by this appendix.
For each alternative, the connector shielding system shall provide a dc
resistance of less than 10 milliohms from the cable shield at its termination
point to the SCSI device enclosure.
In order to support daisy-chain connections, SCSI devices that use shielded
connectors should provide two shielded device connectors on the device
enclosure. These two connectors may be wired "one-to-one" with a stub to the
SCSI device's drivers and receivers provided the maximum stub length is not
violated. Alternatively, two cables may be run from the two shielded
connectors to the drivers and receivers so that the maximum stub length is not
violated. The length of the cable within the device enclosure is included
when calculating the total cable length of the SCSI bus.
D1 Shielded Connector, Alternative 1. The shielded cable connector
(Figure D1) shall be a 50-conductor connector consisting of two rows of 25
female contacts with adjacent contacts 2.54 mm (0.1 in) apart. The nonmating
portion of the connector is shown for reference only.
The shielded SCSI device connector (Figure D2) shall be a 50-conductor
connector consisting of two rows of 25 male pins with adjacent pins 2.54 mm
(0.1 in) apart. The nonmating portion of the connector is shown for reference
only.
The connector pin assignments shall be as shown in Table 4-1 for single-
ended drivers and as shown in Table 4-2 for differential drivers.
D2 Shielded Connector, Alternative 2. The shielded device connector
(Figure D3) shall be a 50-conductor connector consisting of two rows of ribbon
contacts spaced 2.16 mm (0.085 in) apart. The nonmating portion of the
connector is shown for reference only. FCC document Part 68 Subpart F 68.500
should be used for reference.
The shielded cable connector (Figure D4) shall be a 50-conductor connector
consisting of two rows of ribbon contacts spaced 2.16 mm (0.085 in) apart. The
nonmating portion of the connector is shown for reference only.
The connector pin assignments shall be as shown in Table D1 for single-ended
drivers and as shown in Table D2 for differential drivers.
D3 EUROCARD Boxes For boards in EUROCARD boxes (IEC 297 or DIN 41494) the
EMI-screen may be in the front of the boards and in this case a screened cable
and connector may be attached through the front panel to the board connector
specified in section 4.3. It is thereby possible to use the flat ribbon cable
specified in this standard or the shielded cable, as required by users.
Figure D1a. Female Shielded SCSI Cable Connector, Alternative 1
==============================================================================
Dimensions Millimeters Inches
------------------------------------------------------------------------------
A1 60.96 + 0.15 2.400 + 0.006
A2 66.29 + 0.18 2.610 + 0.007
A3 2.54 + 0.15 0.100 + 0.006
A4 2.54 + 0.15 0.100 + 0.006
A5 8.56 + 0.41 0.337 + 0.016
A6 11.93 Minimum 0.470 Minimum
A7 65.02 + 0.18 2.560 + 0.007
A8 5.46 0.215
A9 4.14 + 0.25 0.163 + 0.010
A10 60.20 Maximum 2.370 Maximum
A11 6.60 0.260
A12 1.27 Maximum 0.050 Maximum
A13 0.64 Maximum 0.025 Maximum
A14 6.604 + 0.25, - 0.13 0.260 + 0.010, - 0.005
A15 13.46 0.530
A16 12.45 + 0.38 0.490 + 0.015
==============================================================================
NOTES:
(1) Fifty Contacts on 2.54-mm (0.100-inch) spacing = 60.96 mm (2.40 inch).
(2) Tolerances +_ 0.127 mm (0.005 inch) noncumulative, unless specified
otherwise.
Figure D1b. Female Shielded SCSI Cable Connector, Alternative 1
Figure D2a. Male Shielded SCSI Device Connector, Alternative 1
==============================================================================
Dimensions Millimeters Inches
------------------------------------------------------------------------------
B1 66.65 + 0.15 2.624 + 0.006
B2 65.28 2.570
B3 0.69 0.027
B4 5.77 + 0.81 0.227 + 0.032
B5 9.14 0.360
B6 3.30 0.130
B7 2.54 0.100
B8 2.54 0.100
B9* 2.84 0.112
B10 0.15 0.006
B11 0.38 0.015
B12 8.15 + 0.76, - 0.48 0.321 + 0.030, - 0.019
B13 0.64 + 0.02 0.025 + 0.001
B14* 0.64 Square 0.025 Square
B15 78.84 3.104
B16* 5.77 0.227
B17* 2.92 0.115
B18 4.83 0.190
B19* 3.18 0.125
B20* 1.52 0.060
B21 67.31 2.650
B22 9.65 0.380
==============================================================================
NOTES:
(1) Fifty Contacts on 2.54-mm (0.100-inch) spacing = 60.96 mm (2.40 inch).
(2) Tolerances + 0.127 mm (0.005 inch) noncumulative, unless specified
otherwise.
(3) Dimensions listed with asterisks (*) are shown for reference only.
Figure D2b. Male Shielded SCSI Device Connector, Alternative 1
Figure D3. Shielded SCSI Device Connector, Alternative 2
Figure D4. Shielded SCSI Cable Connector, Alternative 2
Table D1
Single-Ended Pin Assignments
(Shielded Connector, Alternative 2)
==============================================================================
Signal Pin Number
------------------------------------------------------------------------------
-DB(0) 26
-DB(1) 27
-DB(2) 28
-DB(3) 29
-DB(4) 30
-DB(5) 31
-DB(6) 32
-DB(7) 33
-DB(P) 34
GROUND 35
GROUND 36
GROUND 37
TERMPWR 38
GROUND 39
GROUND 40
-ATN 41
GROUND 42
-BSY 43
-ACK 44
-RST 45
-MSG 46
-SEL 47
-C/D 48
-REQ 49
-I/O 50
==============================================================================
NOTES:
(1) Pins 1_12 and 14_25 shall be connected to ground. Pin 13 should be left
open. Some products designed prior to the generation of this standard
connected this pin to ground.
(2) The minus sign next to the signals indicates active low.
Table D2
Differential Pin Assignments
(Shielded Connector, Alternative 2)
==============================================================================
Signal Name Pin Number Signal Name
------------------------------------------------------------------------------
SHIELD GROUND 1 26 GROUND
+DB(0) 2 27 -DB(0)
+DB(1) 3 28 -DB(1)
+DB(2) 4 29 -DB(2)
+DB(3) 5 30 -DB(3)
+DB(4) 6 31 -DB(4)
+DB(5) 7 32 -DB(5)
+DB(6) 8 33 -DB(6)
+DB(7) 9 34 -DB(7)
+DB(P) 10 35 -DB(P)
DIFFSENS 11 36 GROUND
GROUND 12 37 GROUND
TERMPWR 13 38 TERMPWR
GROUND 14 39 GROUND
+ATN 15 40 -ATN
GROUND 16 41 GROUND
+BSY 17 42 -BSY
+ACK 18 43 -ACK
+RST 19 44 -RST
+MSG 20 45 -MSG
+SEL 21 46 -SEL
+C/D 22 47 -C/D
+REQ 23 48 -REQ
+I/O 24 49 -I/O
GROUND 25 50 GROUND
==============================================================================
NOTE:
(1) SHIELD GROUND is optional on some cables. (Implementors note: Some
shielded flat ribbon cables use pin 1 as a connection to the shield.)
Appendix E
Conformance
This appendix contains recommendations on conformance statements to this
standard.
E1. Alternatives
This standard contains various alternatives that are mutually exclusive within
a system.
(1) Single-ended or differential drivers.
(2) Termination power supplied by the cable or not.
(3) Parity implemented or not.
(4) "Hard" RESET or "soft" RESET.
(5) Reservation queuing implemented or not.
E2. Levels of Conformance
By specifying which alternatives (listed above) are implemented, an
environment is created enabling different features to be implemented. These
features are divided into three nested minimum levels as shown in Table E1.
Table E1
Levels of Conformance
==============================================================================
Level Initiator Target
------------------------------------------------------------------------------
0 Accept COMMAND COMPLETE Implement the mandatory commands
message. of section 7.
Accept GOOD and CHECK Implement the mandatory commands
CONDITION status codes. of the supported device type(s).
Implement the COMMAND COMPLETE
message.
If messages other than COMMAND
COMPLETE are implemented, then
implement MESSAGE REJECT message
also.
Implement GOOD and CHECK CONDITION
statuses.
------------------------------------------------------------------------------
1 Same as above plus Same as above.
ARBITRATION phase.
------------------------------------------------------------------------------
2 Same as above plus Same as above plus implement the
accept DISCONNECT, MESSAGE REJECT and IDENTIFY messages
MESSAGE REJECT, and implement all extended commands
IDENTIFY, and SAVE in section 7 and for the supported
DATA POINTER messages device type(s).
==============================================================================
E3. Options
E3.1 Optional Commands. This standard specifies a number of additional
commands that can be implemented in each level. Some of these commands, if
implemented, require the implementation of other optional commands, messages,
or both. In this case, these additional commands, messages, or both shall
also be implemented.
E3.2 Optional Messages. This standard specifies a number of additional
optional messages that may be implemented at any level.
E3.3 Other options. Within some commands, additional features, called
"options", are described. These options need not necessarily be implemented.
E4. Statement of Conformance
Any statement of conformance to this standard should declare which of the
alternates listed in section E1 and which of the three conformance levels are
implemented. In addition, it should indicate which of the options listed in
section E3 are implemented, if any. In the case of optional messages, the
conformance statement should state whether the message is generated, accepted,
or both.
If the synchronous data transfer option is implemented, any statement of
conformance should so indicate and state both the maximum REQ/ACK offset and
the minimum transfer period implemented.
Appendix F
Additional Medium Type and Density Code Standards
In sections 8 and 9 of this standard, the MODE SELECT and MODE SENSE commands
define medium type codes and density codes for certain flexible disks and
magnetic tapes. ANSI standards or X3 draft documents are referenced for code
values if a standard or draft document exists for that code value. In many
cases, other standards also exist for a code value. Tables F1 and F2 in this
appendix provide references to those standards for these code values.
DISCLAIMER: It is not the purpose of this appendix to indicate that these
standards are exactly equivalent to each other. However, these standards may
be applicable. Please refer to sections 8 and 9 for additional information
concerning the medium type or density code.
Table F1
Direct-access Medium Type Codes
==============================================================================
Code Value Medium Type
---------- ------------------------------------------------------------------
00H-02H See section 8.
Flexible Disk Reference Standard(s)
------------------------------------------------------------------
05H X3.73-1980, ECMA-54, ISO 5654/1-1984, ISO 5654/2-1982
06H X3B8-140, ECMA-59
09H X3B8/78-139
0AH X3.121-1984, ECMA-69, ISO 7065/1-1985, ISO 7065/2-1985
0DH X3.82-1980, ECMA-66, ISO 6596/1-1985, ISO 6596/2-1985
12H X3.125-1984, ECMA-70, ISO 7487/1-1985, ISO 7487/2-1985,
ISO 7487/3-1985
16H X3.126-198X, ECMA-78, DIS 8378/1, DIS 8378/2, DIS 8378/3
1AH X3B8/85-199, ECMA-99, DIS 8630/1, DIS 8630/2
1EH X3.137-198X, ECMA-100, DIS 8860/1, DIS 8860/2
Direct-access Magnetic Tape Standard(s)
------------------------------------------------------------------
40H X3B5/85-138 (Note 1), ECMA TC19/83/39
44H X3B5/85-138 (Note 1), ECMA TC19/83/39
80H _ FFH Vendor unique
All others Reserved
==============================================================================
NOTE:
(1) The referenced standard is for unrecorded miniature cartridge media.
The usage referred to here is for serial GCR recording using a format known as
QIC-100. Since X3B5 issues a new document number for each revision of their
working draft document, please contact the Chairman of X3B5 for the latest
document number.
Table F2
Sequential-access Density Codes
==============================================================================
Code Value Density
---------- ------------------------------------------------------------------
00H See section 9.
Magnetic Tape Reference Standard(s)
------------------------------------------------------------------
01H X3.22-1983, ECMA-62
02H X3.39-1973 ECMA-62
03H X3.54-1976, ECMA-62
04H Old format known as QIC-11
05H X3.136-198X, ECMA-98
06H X3B5/85-98 (Note 1)
07H X3.116-198X, ECMA-79
08H X3B5/85-77 (Note 1)
09H X3B5/85-76 (Note 1)
0AH
0BH X3.55, X3.56-198X, ECMA-46, ISO 4057-1979
80H _ FFH Vendor unique
All others Reserved
==============================================================================
NOTES:
(1) Working Draft. X3B5 assigns a new document number to each revision of
their documents. Please contact the Chairman of X3B5 for the latest document
number.
Appendix G
Future Standardization
This appendix is included to provide insight into some possible future
extensions to SCSI that are being considered by X3T9.2. Although X3T9.2 has
addressed some of these extensions, many details remain to be resolved.
Further work by X3T9.2 may result in changes or additions to these extensions.
Please contact the Chairman of X3T9.2 for the current status of this activity.
Six new commands are being considered, three for targets that support
caching, one to provide a means to read the medium defect data, and two to
provide a standardized method for writing and reading the target's data buffer
(principally intended to support start-of-day tests that insure data path
integrity). The tentative operation codes are as follows:
==============================================================================
Operation
Code Type Command Name Device Types
------------------------------------------------------------------------------
34H O PRE-FETCH \ Direct Access, Write-Once
35H O FLUSH CACHE > Read-Multiple, and
36H O LOCK/UNLOCK CACHE / Read-Only Direct Access
37H O READ DEFECT DATA Direct Access
3BH O WRITE BUFFER All
3CH O READ BUFFER All
------------------------------------------------------------------------------
New parameters are being considered in several of the existing commands:
(1) Cache control bits are being considered for bits 3 and 4 of byte 1 in
several group 1 commands, including READ, WRITE, WRITE AND VERIFY, and VERIFY.
(2) Byte 1 of the Defect List in the FORMAT UNIT command may be used to
provide additional defect management control.
(3) Bits 0 _ 3 of byte 3 of the Inquiry Data in the INQUIRY command may be
used to identify that the device supports certain additions to the standard.
One such addition that is being considered is optional fields within the
Inquiry Data to identify the manufacturer and the product model information.
(4) Extensions to the MODE SELECT and MODE SENSE commands are being
considered to provide a standard means to control certain target parameters.
Bits 0 _ 5 of byte 2 of the MODE SENSE command are being considered for use in
controlling which target parameters are returned by this command.
The Group 0 commands for sequential-access devices shall be as shown in
Table 9-1.
Table 9-1
Group 0 Commands for Sequential-Access Devices
==============================================================================
Operation
Code Type Command Name Section
------------------------------------------------------------------------------
00H O TEST UNIT READY 7.1.1
01H M REWIND 9.1
02H V
03H M REQUEST SENSE 7.1.2
04H R
05H E READ BLOCK LIMITS 9.2
06H V
07H V
08H M READ 9.3
09H V
0AH M WRITE 9.4
0BH O TRACK SELECT 9.5
0CH V
0DH V
0EH V
0FH O READ REVERSE 9.6
10H M WRITE FILEMARKS 9.7
11H O SPACE 9.8
12H E INQUIRY 7.1.3
13H O VERIFY 9.9
14H O RECOVER BUFFERED DATA 9.10
15H O MODE SELECT 9.11
16H O RESERVE UNIT 9.12.1
17H O RELEASE UNIT 9.12.2
18H O COPY 7.1.4
19H O ERASE 9.13
1AH O MODE SENSE 9.14
1BH O LOAD/UNLOAD 9.15
1CH O RECEIVE DIAGNOSTIC RESULTS 7.1.5
1DH O SEND DIAGNOSTIC 7.1.6
1EH O PREVENT/ALLOW MEDIUM REMOVAL 9.16
1FH R
==============================================================================
Key: M = Command implementation is mandatory.
E = Command implementation is required for SCSI devices that support
device-independent self-configuring software.
O = Command implementation is optional.
R = Operation code is reserved for future standardization.
V = Operation code is available for vendor unique commands.
9.1 REWIND Command
Peripheral Device Type: Sequential Access
Operation Code Type: Mandatory
Operation Code: 01H
Table 9-2
REWIND Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Immed |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Reserved |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The REWIND command (Table 9-2) requests that the target rewind the logical
unit to the beginning-of-medium or load-point.
An immediate (Immed) bit of one indicates that status shall be returned as
soon as the operation is initiated. An Immed bit of zero indicates that
status shall be returned after the operation is completed.
9.2 READ BLOCK LIMITS Command
Peripheral Device Type: Sequential Access
Operation Code Type: Extended
Operation Code: 05H
Table 9-3
READ BLOCK LIMITS Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Reserved |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The READ BLOCK LIMITS command (Table 9-3) requests that the target's
capability for block length limits be returned for the logical unit. The READ
BLOCK LIMITS data shown in Table 9-4 shall be sent during the DATA IN phase of
the command.
Table 9-4
READ BLOCK LIMITS Data
==============================================================================
Byte | Description |
==============================================================================
0 | Reserved |
-----|-----------------------------------------------------------------------|
1 | Maximum Block Length (MSB) |
-----|-----------------------------------------------------------------------|
2 | Maximum Block Length |
-----|-----------------------------------------------------------------------|
3 | Maximum Block Length (LSB) |
-----|-----------------------------------------------------------------------|
4 | Minimum Block Length (MSB) |
-----|-----------------------------------------------------------------------|
5 | Minimum Block Length (LSB) |
==============================================================================
If the maximum block length equals the minimum block length, only fixed-
length blocks of the length indicated are supported. Otherwise, variable-
length blocks are supported. For variable-length blocks, if the maximum block
length equals zero, no upper limit is specified.
9.3 READ Command
Peripheral Device Type: Sequential Access
Operation Code Type: Mandatory
Operation Code: 08H
Table 9-5
READ Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Fixed |
-----|-----------------------------------------------------------------------|
2 | Transfer Length (MSB) |
-----|-----------------------------------------------------------------------|
3 | Transfer Length |
-----|-----------------------------------------------------------------------|
4 | Transfer Length (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The READ command (Table 9-5) transfers one or more block(s) to the initiator
beginning with the next block on the logical unit. The fixed bit specifies
both the meaning of the transfer length field and whether fixed-length or
variable-length block(s) are to be transferred.
If the fixed bit is zero, a single block shall be transferred with the
transfer length specifying the maximum number of bytes the initiator has
allocated for the returned data. If the actual block length is different from
the specified transfer length, a CHECK CONDITION status shall be sent to the
initiator and the incorrect length indicator (ILI) bit and valid bit in
extended sense shall be set to one. The information bytes in extended sense
shall be set to the difference (residue) between the requested transfer length
and the actual block length. Targets that do not support negative residues
shall set the ILI bit to one and the residue to zero when the actual block
length is larger than the transfer length. In any case, no more than transfer
length bytes shall be transferred to the initiator and the medium shall be
positioned after the block (end-of-medium side).
If the fixed bit is one, the transfer length specifies the number of blocks
to be transferred to the initiator. This form of the READ command is valid
only if the logical unit is currently operating in fixed block mode. A
logical unit is in fixed block mode when either of the following conditions
are true:
(1) The logical unit reports the same value for minimum block length and
maximum block length in response to the READ BLOCK LIMITS command. In this
case, the current block length is the value returned.
(2) The logical unit unit has been instructed to use fixed-length blocks
with the MODE SELECT command. In this case, the current block length is the
block length defined in the MODE SELECT command.
Otherwise, the logical unit is in variable block mode. The target may
implement fixed block mode, variable block mode, or both modes. If the fixed
bit does not match the current mode, or the mode indicated by the fixed bit is
not implemented, the target shall reject the command by returning a CHECK
CONDITION status and by setting the sense key to ILLEGAL REQUEST.
A successful READ command with the fixed bit equal to one shall transfer the
current block length times the transfer length bytes of data to the initiator.
Upon termination of the READ command, the medium shall be positioned after the
last block transferred (end-of-medium side).
If the fixed bit is one and if a block is read that is larger or smaller
than the current block length, a CHECK CONDITION status shall be returned to
the initiator. The ILI bit and the valid bit in extended sense shall be set
to one. The information bytes shall be set to the difference (residue)
between the requested transfer length and the actual number of blocks read
(not including the incorrect length block). Upon termination, the medium
shall be positioned after the incorrect length block (end-of-medium side).
If a logical unit reads a filemark during a READ command, it shall send a
CHECK CONDITION status to the initiator and shall set the filemark bit in
extended sense. Upon termination, the medium shall be positioned after the
filemark (end-of-medium side). If the fixed bit is one, the target shall set
the valid bit to one and the information bytes shall be set to the difference
(residue) between the requested transfer length and the actual number of
blocks read (not including the filemark).
If a logical unit encounters the physical end-of-medium during a READ
command, the target shall return a CHECK CONDITION status to the initiator and
shall set the end-of-medium (EOM) bit to one in extended sense. The sense key
shall be set to MEDIUM ERROR. If the fixed bit is one, the target shall set
the valid bit to one and the information bytes to the difference (residue)
between the requested transfer length and the actual number of blocks
successfully read. The medium position following this condition is not
defined.
When the transfer length is zero, no data shall be transferred and the
current position on the logical unit shall not be changed. This condition
shall not be considered as an error.
9.4 WRITE Command
Peripheral Device Type: Sequential Access
Operation Code Type: Mandatory
Operation Code: 0AH
Table 9-6
WRITE Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Fixed |
-----|-----------------------------------------------------------------------|
2 | Transfer Length (MSB) |
-----|-----------------------------------------------------------------------|
3 | Transfer Length |
-----|-----------------------------------------------------------------------|
4 | Transfer Length (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The WRITE command (Table 9-6) transfers one or more block(s) from the
initiator to the current position on the logical unit. The fixed bit
specifies both the meaning of the transfer length field and whether fixed-
length or variable-length block(s) are to be transferred.
If the fixed bit is zero, a single block shall be transferred from the
initiator and shall be written to the logical unit beginning at the current
medium position. The transfer length specifies the length of the block to be
written (in bytes). The requested block length shall be within the minimum
and maximum block length range (returned by the READ BLOCK LIMITS command,
Section 9.2). If this condition is not met, a CHECK CONDITION status shall
be returned and the sense key shall be set to ILLEGAL REQUEST and no data
shall be written. Upon successful termination, the medium shall be positioned
after the block written by this command (end-of-medium side).
If the fixed bit is one, the transfer length field specifies the number of
block(s) to be transferred to the logical unit beginning at the current medium
position. This form of the WRITE command is valid only if the logical unit is
currently operating in fixed block mode (see 9.3). Upon termination, the
medium shall be positioned after the block(s) written by this command (end-of-
medium side)
The target may implement fixed block mode, variable block mode, or both
modes. If the fixed bit does not match the current mode, or the mode
indicated by the fixed bit is not implemented, the target shall reject the
command by returning a CHECK CONDITION status and by setting the sense key to
ILLEGAL REQUEST.
If the early warning end-of-medium condition is encountered while writing,
an attempt to finish writing any buffered data may be made. The command shall
terminate with a CHECK CONDITION status and the EOM bit in extended sense
shall be set to one. If any data remains in the target's buffer, then the
sense key shall be set to VOLUME OVERFLOW. If the fixed bit is one and the
logical unit is not buffered (buffered mode of the MODE SENSE command is
zero), then the valid bit in extended sense shall be set to one and the
information bytes shall be set to the difference (residue) between the
requested transfer length and the actual number of blocks written to the
medium. If the fixed bit is one and the logical unit is buffered (buffered
mode of the MODE SENSE command is one), then the valid bit shall be set to one
and the information bytes shall be set to the total number of blocks not
written (the number of blocks not transferred from the initiator plus the
number of blocks remaining in the target's buffer). Note that in this case it
is possible for the value in the information bytes to exceed the transfer
length.
When the transfer length is zero, no data shall be transferred and the
current position on the logical unit shall not be changed. This condition
shall not be considered as an error.
9.5 TRACK SELECT Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 0BH
Table 9-7
TRACK SELECT Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Track Value |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The TRACK SELECT command (Table 9-7) requests that the track specified in
the track value field be selected.
9.6 READ REVERSE Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 0FH
Table 9-8
READ REVERSE Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Fixed |
-----|-----------------------------------------------------------------------|
2 | Transfer Length (MSB) |
-----|-----------------------------------------------------------------------|
3 | Transfer Length |
-----|-----------------------------------------------------------------------|
4 | Transfer Length (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The READ REVERSE command (Table 9-8) functions identically to the READ
command except that medium motion is in the reverse direction. Thus, the
block(s) and bytes within the block(s) are transferred in the reverse order
and the medium position upon termination is before the last block read
(beginning-of-medium side). This command shall terminate with a CHECK
CONDITION status and the EOM bit in extended sense shall be set to one if
beginning-of-medium or load-point is encountered. The sense key shall be set
to NO SENSE. If the fixed bit is one, then the valid bit shall be set to one
and the information bytes shall contain the difference (residue) of the
requested transfer length and the actual number of blocks transferred before
beginning-of-medium or load-point was encountered.
Filemark handling is the same as in the READ command except that the medium
position upon command termination shall be before the filemark (beginning-of-
medium side).
If the transfer length is zero, no data shall be transferred and the current
position on the logical unit shall not be changed. This condition shall not
be considered as an error.
The target may implement fixed block mode, variable block mode, or both
modes. If the fixed bit does not match the current mode, or the mode
indicated by the fixed bit is not implemented, the target shall reject the
command by returning a CHECK CONDITION status and by setting the sense key to
ILLEGAL REQUEST.
9.7 WRITE FILEMARKS Command
Peripheral Device Type: Sequential Access
Operation Code Type: Mandatory
Operation Code: 10H
Table 9-9
WRITE FILEMARKS Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Number of Filemarks (MSB) |
-----|-----------------------------------------------------------------------|
3 | Number of Filemarks |
-----|-----------------------------------------------------------------------|
4 | Number of Filemarks (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The WRITE FILEMARKS command (Table 9-9) causes the specified number of
filemarks to be written beginning at the current medium position on the
logical unit. A zero in this field indicates that no filemarks are to be
written.
This command is also used to force any buffered data (see buffered mode in
the MODE SENSE command, Section 9.14) to be written. This command shall not
return a GOOD status unless all buffered data blocks and the filemarks (if
any) are correctly written on the medium.
If the early warning end-of-medium condition is encountered while writing,
an attempt to finish writing any buffered data may be made. The command shall
terminate with a CHECK CONDITION status and the EOM bit in extended sense
shall be set to one. If any filemarks remain to be written, then the sense
key shall be set to VOLUME OVERFLOW. If the logical unit is not buffered
(buffered mode of the MODE SENSE command is zero), then the valid bit in
extended sense shall be set to one and the information bytes shall be set to
the number of unwritten filemarks. If the logical unit is buffered (buffered
mode of the MODE SENSE command is one), then the valid bit shall be set to one
and the information bytes shall be set to the total number of blocks not
written (the number of unwritten filemarks plus the number of blocks remaining
in the target's buffer). Note that in this case it is possible for the value
in the information bytes to exceed the transfer length.
9.8 SPACE Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 11H
Table 9-10
SPACE Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Code |
-----|-----------------------------------------------------------------------|
2 | Count (MSB) |
-----|-----------------------------------------------------------------------|
3 | Count |
-----|-----------------------------------------------------------------------|
4 | Count (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The SPACE command (Table 9-10) provides a variety of positioning functions
that are determined by the code and count. Both forward (toward end-of-
medium) and reverse (toward beginning-of-medium) positioning are provided,
although some SCSI devices may only support a subset of this command. Such
SCSI devices shall return a CHECK CONDITION status and set the sense key to
ILLEGAL REQUEST in response to any attempt to invoke a function that is not
supported.
The code is defined as follows:
DB(1) DB(0) Description
----- ----- --------------------
0 0 Blocks
0 1 Filemarks
1 0 Sequential Filemarks
1 1 Physical End-of-Data
When spacing over blocks or filemarks, the count field specifies the number
of blocks or filemarks to be spaced over. A positive value N in the count
field shall cause forward medium movement over N blocks or filemarks ending on
the end-of-medium side of the last block or filemark. A zero value in the
count field shall cause no medium movement. A negative value -N (2's
complement notation) in the count field shall cause reverse medium movement
over N blocks or filemarks ending on the beginning-of-medium side of the last
block or filemark.
If a filemark is encountered while spacing over blocks, medium movement
shall be stopped. The medium shall be positioned on the end-of-medium side of
the filemark if movement was in the forward direction and on the beginning-of-
medium side of the filemark if movement was in the reverse direction. A CHECK
CONDITION status shall be sent to the initiator and the filemark and valid
bits in extended sense shall be set to one. The information bytes shall be
set to the difference (residue) in the requested count and the actual number
of blocks spaced over (not including the filemark).
If the physical end-of-medium is encountered while spacing forward over
blocks or filemarks, the target shall return a CHECK CONDITION status to the
initiator and shall set the end-of-medium (EOM) bit in extended sense to one.
The sense key shall be set to MEDIUM ERROR. The target shall set the valid
bit to one and the information bytes to the difference (residue) between the
requested count and the actual number of blocks or filemarks spaced over.
If beginning-of-medium or load-point is encountered while spacing over
blocks or filemarks in the reverse direction, the target shall return a CHECK
CONDITION status to the initiator and shall set the end-of-medium (EOM) bit in
extended sense to one. The sense key shall be set to NO SENSE. The target
shall set the valid bit to one and the information bytes to the difference
(residue) between the requested count and the actual number of blocks or
filemarks spaced over.
When spacing over sequential filemarks, the count field is interpreted as
follows:
(1) A positive value N shall cause forward medium movement to the first
occurrence of N or more consecutive filemarks stopping after the Nth filemark.
(2) A zero value shall cause no medium movement.
(3) A negative value -N (2's complement notation) shall cause reverse medium
movement to the first occurrence of N or more consecutive filemarks stopping
on the beginning-of-medium side of the Nth filemark.
When spacing to physical end-of-data, the count field is ignored. Forward
medium movement shall occur until the logical unit encounters physical end-of-
data as defined by the sequential-access device. Some sequential-access
devices define physical end-of-data as an erased area on the medium; however,
other definitions are not precluded. Targets that implement this function
shall leave the medium positioned such that a subsequent WRITE command would
append data to the last recorded information on the medium.
9.9 VERIFY Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 13H
Table 9-11
VERIFY Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | BytCmp | Fixed |
-----|-----------------------------------------------------------------------|
2 | Verification Length (MSB) |
-----|-----------------------------------------------------------------------|
3 | Verification Length |
-----|-----------------------------------------------------------------------|
4 | Verification Length (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The VERIFY command (Table 9-11) verifies one or more block(s) beginning with
the next block on the logical unit. The fixed bit specifies both the meaning
of the verification length field and whether fixed-length or variable-length
block(s) are to be verified.
A byte compare (BytCmp) bit of zero indicates that the verification shall be
simply a medium verification (CRC, ECC, etc). No data shall be transferred
between the initiator and target. A byte compare bit of one indicates that a
byte-by-byte compare of the data on the medium, and the data transferred from
the initiator shall be performed by the target. Data shall be transferred
from the initiator to the target as in a WRITE command.
A fixed bit of zero requests that the next block of the logical unit be
verified. The verification length specifies the number of bytes to verify. A
fixed bit of one requests verification length blocks be verified beginning
with the next logical block on the logical unit. This form of the VERIFY
command is only valid if the logical unit is currently in fixed block mode as
defined in the READ command. If the data does not compare (byte compare bit
equals one), the command shall terminate with a CHECK CONDITION status and the
sense key shall be set to MISCOMPARE. If the fixed bit is one, the valid bit
shall be set to one and the information bytes shall be set to the difference
(residue) between the verification length and the actual number of blocks
successfully verified. The medium shall be positioned after the block
containing the miscompare (end-of-medium side).
The target may implement fixed block mode, variable block mode, or both
modes. If the fixed bit does not match the current mode, or the mode
indicated by the fixed bit is not implemented, the target shall reject the
command by returning a CHECK CONDITION status and by setting the sense key to
ILLEGAL REQUEST.
The VERIFY command shall terminate when the verification length has been
satisfied, when a filemark is encountered, or when physical end-of-medium is
encountered. The status and sense data for each of these conditions are
handled the same as in the READ command. Upon completion of the VERIFY
command, the medium shall be positioned after the last block from which data
was verified or after the filemark, if encountered.
When the verification length is zero, no data shall be verified and the
current position on the logical unit shall not be changed. This condition
shall not be considered as an error.
9.10 RECOVER BUFFERED DATA Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 14H
Table 9-12
RECOVER BUFFERED DATA Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Fixed |
-----|-----------------------------------------------------------------------|
2 | Transfer Length (MSB) |
-----|-----------------------------------------------------------------------|
3 | Transfer Length |
-----|-----------------------------------------------------------------------|
4 | Transfer Length (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The RECOVER BUFFERED DATA command (Table 9-12) is used to read data that has
been transferred to an SCSI device buffer but has not been written on the
medium. It is normally only used to recover from error or exception
conditions that make it impossible to write the buffered data on the medium.
This command functions similarly to the READ command except that the data is
transferred from the SCSI device buffer instead of the medium. The order in
which block(s) are transferred is the same as if they would have been
transferred to the medium. One or more RECOVER BUFFERED DATA commands may be
used to read the unwritten buffered data.
The target may implement fixed block mode, variable block mode, or both
modes. If the fixed bit does not match the current mode, or the mode
indicated by the fixed bit is not implemented, the target shall reject the
command by returning a CHECK CONDITION status and by setting the sense key to
ILLEGAL REQUEST.
If an attempt is made to recover more logical blocks of data than are
contained in the SCSI device buffer, the command shall be terminated with a
CHECK CONDITION status. The EOM bit in extended sense shall be set to one.
If the fixed bit is one, the valid bit shall be set to one and the information
bytes shall be set to the difference (residue) between the requested transfer
length and the actual number of blocks transferred.
The transfer length specifies the number of contiguous logical blocks of
data to be transferred. A transfer length of zero indicates that no data
shall be transferred. This condition shall not be considered as an error.
9.11 MODE SELECT Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 15H
Table 9-13
MODE SELECT Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Parameter List Length |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The MODE SELECT command (Table 9-13) provides a means for the initiator to
specify medium, logical unit, or peripheral device parameters to the target.
The parameter list length specifies the length in bytes of the MODE SELECT
parameter list that shall be transferred during the DATA OUT phase. A zero
parameter list length indicates that no data shall be transferred. This
condition shall not be considered as an error.
The MODE SELECT parameter list shown in Table 9-14 contains a four-byte
header, followed by zero or more eight-byte block descriptors, followed by the
vendor unique parameters, if any.
Table 9-14
MODE SELECT Parameter List
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Reserved |
-----|-----------------------------------------------------------------------|
1 | Reserved |
-----|-----------------------------------------------------------------------|
2 |Reserved| Buffered Mode | Speed |
-----|-----------------------------------------------------------------------|
3 | Block Descriptor Length |
==============================================================================
| Block Descriptor(s) |
==============================================================================
0 | Density Code |
-----|-----------------------------------------------------------------------|
1 | Number of Blocks (MSB) |
-----|-----------------------------------------------------------------------|
2 | Number of Blocks |
-----|-----------------------------------------------------------------------|
3 | Number of Blocks (LSB) |
-----|-----------------------------------------------------------------------|
4 | Reserved |
-----|-----------------------------------------------------------------------|
5 | Block Length (MSB) |
-----|-----------------------------------------------------------------------|
6 | Block Length |
-----|-----------------------------------------------------------------------|
7 | Block Length (LSB) |
==============================================================================
| Vendor Unique Parameter(s) |
==============================================================================
0 _ n| Vendor Unique |
| Parameter Byte(s) |
==============================================================================
A buffered mode of zero indicates that the target shall not report a GOOD
status on WRITE commands until the data blocks are actually written on the
medium. A buffered mode of one indicates that the target may report a GOOD
status on WRITE commands as soon as the data block has been transferred to the
SCSI device buffer. One or more blocks may be buffered prior to writing the
block(s) to the medium. Buffered modes of 2H through 7H are reserved.
Code values for the speed field shall be assigned as follows:
0H Default (Use the peripheral device's default speed).
1H Use the peripheral device's lowest speed.
2H _ FH Use increasing peripheral device speeds.
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 the vendor unique parameters, if any. A block descriptor
length of zero indicates that no block descriptors are included in the
parameter list. This condition shall not be considered as an error.
Each block descriptor specifies the medium characteristics for all or part
of a logical unit. Each block descriptor contains a density code, a number of
blocks, and a block length.
Code values for the density code field are defined in Table 9-14.1.
Table 9-14.1
Sequential-access Density Codes
==============================================================================
Code Value Density
---------- ------------------------------------------------------------------
00H Default (peripheral device's default or only density)
Magnetic Tapes
Width Density Reference
mm. (Inch) Tracks BPMM (BPI) Code Type Standard Note
---------- ------ ------------ ---- ---- ------------ ----
01H 12.7 (0.5) 9 32 (800) NRZI R X3.22-1983 3
02H 12.7 (0.5) 9 63 (1 600) PE R X3.39-1973 3
03H 12.7 (0.5) 9 246 (6 250) GCR R X3.54-1976 3
04H 6.3 (0.25) 4/9 315 (8 000) GCR C 2,4
05H 6.3 (0.25) 4/9 315 (8 000) GCR C X3.136-198X 2
06H 12.7 (0.5) 9 126 (3 200) PE R X3B5/85-98 1,3
07H 6.3 (0.25) 4 252 (6 400) IMFM C X3.116-198X 2
08H 3.81 (0.15) 4 315 (8 000) GCR CS X3B5/85-77 1,2
09H 12.7 (0.5) 18 C X3B5/85-76 1,3
0AH 12.7 (0.5) 22 267 (6 667) MFM C 2
0BH 6.3 (0.25) 4 63 (1 600) PE C X3.56-198X 2
0CH 12.7 (0.5) 24 500 (12 690) GCR C 2
0DH 12.7 (0.5) 24 999 (25 380) GCR C 2
80H _ FFH Vendor unique
All others Reserved
==============================================================================
Key:
Code Type
-------------------------------------------- -----------------------
NRZI Non Return to Zero, change on ones R Reel-to-Reel
GCR Group Code Recording C Cartridge
PE Phase Encoded CS Cassette
IMFM Inverted Modified Frequency Modulation
NOTES:
(1) Working Draft. X3B5 assigns a new document number to each revision of
their documents. Please contact the Chairman of X3B5 for the latest document
number.
(2) Serially Recorded.
(3) Parallel Recorded.
(4) Old format known as QIC-11.
The number of blocks field specifies the number of logical blocks on the
medium that meet the density code and block length in the block descriptor. A
number of blocks of zero indicates that all of the remaining logical blocks of
the logical unit shall have the medium characteristics specified by the block
descriptor.
The block length specifies the length in bytes of each logical block
described by the block descriptor. A block length of zero indicates that the
length shall be variable.
9.12 RESERVE UNIT and RELEASE UNIT Commands
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 16H and 17H, respectively
Table 9-15
RESERVE UNIT and RELEASE UNIT Commands
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | 3rdPty | Third Party Device ID |Reserved|
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Reserved |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The RESERVE UNIT and RELEASE UNIT commands both use the command descriptor
block shown in Table 9-15.
9.12.1 RESERVE UNIT Command. The RESERVE UNIT command (Table 9-15,
operation code 16H) shall reserve the specified logical unit for the exclusive
use by the requesting initiator or, if third-party reservation option is
implemented, to another specified SCSI device.
The reservation shall remain in effect until superceded by another RESERVE
UNIT command from the initiator that made the reservation or until released by
a RELEASE UNIT command from the same initiator, or a BUS DEVICE RESET message
from any initiator, or a "hard" RESET condition. The occurrence of the last
two conditions is indicated by a sense key of UNIT ATTENTION on the next
command following the condition. It is not an error to issue this command to
a logical unit that is currently reserved to the requesting initiator.
If the logical unit is previously reserved by another initiator, then the
target shall either:
(1) return a RESERVATION CONFLICT status
(2) queue the reservation request and disconnect until all previously
queued reservations have been released. When the logical unit is available,
the target shall reconnect to perform the reservation
If, after honoring the reservation, any other initiator then subsequently
attempts to perform any command on the reserved logical unit other than a
RESERVE UNIT command, which may be queued, or a RELEASE UNIT command, which
shall be ignored, then the command shall be rejected with a RESERVATION
CONFLICT status.
The third-party reservation option for the RESERVE UNIT command allows an
initiator to reserve a logical unit for another SCSI device. This option is
intended for use in multiple-initiator systems that use the COPY command. Any
target that implements the third-party reservation option shall also implement
the third-party release option (see 9.12.2).
If the third-party (3rdPty) bit is zero, then the third-party reservation
option is not requested. If the 3rdPty bit is one and the third-party
reservation option is implemented, then the RESERVE UNIT command shall reserve
the specified logical unit for the SCSI device specified in the third-party
device ID field. The target shall preserve the reservation until superceded
by another RESERVE UNIT command from the initiator that made the reservation
or until released by the same initiator, by a BUS DEVICE RESET message from
any initiator, or by a "hard" RESET condition. The target shall ignore (i.e.,
return GOOD status) any attempt made by any other initiator to release the
reservation.
If the 3rdPty bit is one and the third-party reservation option is not
implemented, then the target shall reject the RESERVE UNIT command with a
CHECK CONDITION status and a sense key of ILLEGAL REQUEST.
An initiator that holds a current reservation may modify that reservation
(e.g., switch third-parties) by issuing another RESERVE UNIT command to the
same logical unit. The superceding RESERVE UNIT command shall release the
previous reservation state only when the new reservation is granted. A
superceding reservation takes priority over any previously queued reservation
request.
9.12.2 RELEASE UNIT Command. The RELEASE UNIT command (Table 9-15,
operation code 17H) shall release the logical unit if it is currently reserved
by the requesting initiator.
It is not an error to attempt to release a logical unit that is not
currently reserved to the requesting initiator. However, it shall not be
released if it is reserved by another initiator.
The third-party release option for the RELEASE UNIT command allows an
initiator to release a logical unit that was previously reserved using the
third-party reservation option (see 9.12.1). This option shall be implemented
if the third-party reservation option is implemented. This option is intended
for use in multiple-initiator systems that use the COPY command.
If the third-party (3rdPty) bit is zero, then the third-party release option
is not requested. If the 3rdPty bit is one and the target implements the
third-party release option, then the target shall release the specified
logical unit, but only if the reservation was made using the third-party
reservation option by the initiator that is requesting the release and for the
same SCSI device as specified in the third-party device ID field.
If the 3rdPty bit is one and the target does not implement the third-party
release option, then the target shall terminate the command with a CHECK
CONDITION status and the sense key shall be set to ILLEGAL REQUEST.
9.13 ERASE Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 19H
Table 9-16
ERASE Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Long |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Reserved |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The ERASE command (Table 9-16) causes part or all of the remaining medium to
be erased beginning from the current medium position. As used here, "erased"
means either the medium shall be erased or a pattern shall be written on the
medium that appears as gap to the target.
The distance to be erased is controlled by the long bit. A long bit of one
indicates that all remaining medium on the logical unit shall be erased. A
long bit of zero indicates that a peripheral device specified portion of the
medium shall be erased. Normally, short erases are used to create an extended
gap for software controlled error recovery or for support of "update in place"
functions. The medium position following an ERASE command with a long bit of
one is not defined by this standard.
NOTE: Some targets may reject ERASE commands with the long bit set to one if
the medium is not positioned at the beginning-of-medium.
9.14 MODE SENSE Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 1AH
Table 9-17
MODE SENSE Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Allocation Length |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The MODE SENSE command (Table 9-17) provides a means for a target to report
its medium, logical unit, or peripheral device parameters to the initiator.
It is a complementary command to the MODE SELECT command (see 9.11) for
support of a medium that may contain different densities, such as half-inch
tapes.
The allocation length specifies the number of bytes that the initiator has
allocated for returned MODE SENSE data. An allocation length of zero
indicates that no MODE SENSE data shall be transferred. This condition shall
not be considered as an error. Any other value indicates the maximum number
of bytes that shall be transferred. The target shall terminate the DATA IN
phase when allocation length bytes have been transferred or when all available
MODE SENSE data have been transferred to the initiator, whichever is less.
The MODE SENSE data (Table 9-18) contains a four-byte header, followed by
zero or more eight-byte block descriptors, followed by the vendor unique
parameters, if any.
Table 9-18
MODE SENSE Data
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Sense Data Length |
-----|-----------------------------------------------------------------------|
1 | Medium Type |
-----|-----------------------------------------------------------------------|
2 | WP | Buffered Mode | Speed |
-----|-----------------------------------------------------------------------|
3 | Block Descriptor Length |
==============================================================================
| Block Descriptor(s) |
==============================================================================
0 | Density Code |
-----|-----------------------------------------------------------------------|
1 | Number of Blocks (MSB) |
-----|-----------------------------------------------------------------------|
2 | Number of Blocks |
-----|-----------------------------------------------------------------------|
3 | Number of Blocks (LSB) |
-----|-----------------------------------------------------------------------|
4 | Reserved |
-----|-----------------------------------------------------------------------|
5 | Block Length (MSB) |
-----|-----------------------------------------------------------------------|
6 | Block Length |
-----|-----------------------------------------------------------------------|
7 | Block Length (LSB) |
==============================================================================
| Vendor Unique Parameter(s) |
==============================================================================
0 _ n| Vendor Unique |
| Parameter Byte(s) |
==============================================================================
The sense data length specifies the length in bytes of the following mode
sense data that is available to be transferred during the DATA IN phase. The
sense data length does not include itself.
Code values for the medium type field shall be assigned as follows:
00H Default (Only one medium type supported)
01H _ 7FH Reserved
80H _ FFH Vendor unique
A write protected (WP) bit of zero indicates that the medium is write
enabled. A write protected bit of one indicates that the medium is write
protected.
A buffered mode of zero indicates that the target does not report a GOOD
status on WRITE commands until the data blocks are actually written on the
medium. A buffered mode of one indicates that the target may report a GOOD
status on WRITE commands as soon as the data block has been transferred to the
SCSI device buffer. One or more blocks may be buffered prior to writing the
block(s) to the medium. Buffered modes of 2H through 7H are reserved.
Code values for the speed field shall be assigned as follows:
0H Default (only one speed supported)
1H Lowest peripheral device speed
2H _ FH Increasing peripheral device speeds
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 the vendor unique parameters, if any. A block descriptor
length of zero indicates that no block descriptors shall be included in the
parameter list. This condition shall not be considered as an error.
Each block descriptor specifies the medium characteristics for all or part
of a logical unit. Each block descriptor contains a density code, a number of
blocks, and a block length.
Code values for the density code field are defined in Table 9-14.1.
The number of blocks field specifies the number of logical blocks on the
medium that meet the density code and block length in the block descriptor. A
number of blocks of zero indicates that all of the remaining logical blocks of
the logical unit have the medium characteristics specified by the block
descriptor.
The block length specifies the length in bytes of each logical block
described by the block descriptor. A block length of zero indicates that the
length is variable.
9.15 LOAD/UNLOAD Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 1BH
Table 9-19
LOAD/UNLOAD Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved | Immed |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Reserved | Re-Ten | Load |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The LOAD/UNLOAD command (Table 9-19) requests that the target enable or
disable the logical unit for further operations. This command may also be
used to request the re-tension function on peripheral devices that support
this function.
A load bit of one indicates that the medium on the logical unit shall be
loaded and positioned to the beginning-of-medium or load-point as determined
by the peripheral device. A load bit of zero indicates that the medium on the
logical unit shall be positioned for removal from the peripheral device.
Status shall be returned after the medium is positioned unless the immediate
(Immed) bit is one. If the Immed bit is one, status may be returned as soon
as the command has been accepted.
A re-tension (Re-Ten) bit of one indicates that the medium on the addressed
logical unit shall be correctly tensioned before the LOAD/UNLOAD command is
completed. This is an optional function intended for use by those peripheral
devices that support the re-tension function.
9.16 PREVENT/ALLOW MEDIUM REMOVAL Command
Peripheral Device Type: Sequential Access
Operation Code Type: Optional
Operation Code: 1EH
Table 9-20
PREVENT/ALLOW MEDIUM REMOVAL Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Reserved |
-----|-----------------------------------------------------------------------|
3 | Reserved |
-----|-----------------------------------------------------------------------|
4 | Reserved | Prevent|
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The PREVENT/ALLOW MEDIUM REMOVAL command (Table 9-20) requests that the
target enable or disable the removal of the medium in the logical unit.
A prevent bit of one shall inhibit mechanisms that normally allow removal of
the medium. A prevent bit of zero shall allow removal of the medium.
This prevention of medium removal condition shall terminate upon receipt of
a PREVENT/ALLOW MEDIUM REMOVAL command with the prevent bit set to zero, or by
the receipt of a BUS DEVICE RESET message from any initiator or by a "hard"
RESET condition.
11. Group 0 Command Descriptions for Processor Devices
The Group 0 commands for processor devices shall be as shown in Table 11-1.
Table 11-1
Group 0 Commands for Processor Devices
==============================================================================
Operation
Code Type Command Name Section
------------------------------------------------------------------------------
00H O TEST UNIT READY 7.1.1
01H V
02H V
03H M REQUEST SENSE 7.1.2
04H V
05H V
06H V
07H V
08H O RECEIVE 11.1
09H V
0AH M SEND 11.2
0BH V
0CH V
0DH V
0EH V
0FH V
10H V
11H V
12H E INQUIRY 7.1.3
13H V
14H V
15H V
16H V
17H V
18H O COPY 7.1.4
19H R
1AH R
1BH R
1CH O RECEIVE DIAGNOSTIC RESULTS 7.1.5
1DH O SEND DIAGNOSTIC 7.1.6
1EH R
1FH R
==============================================================================
Key: M = Command implementation is mandatory.
E = Command implementation is required for SCSI devices that support
device-independent self-configuring software.
O = Command implementation is optional.
R = Operation code is reserved for future standardization.
V = Operation code is available for vendor unique commands.
11.1 RECEIVE Command
Peripheral Device Type: Processor Devices
Operation Code Type: Optional
Operation Code: 08H
Table 11-2
RECEIVE Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Allocation Length (MSB) |
-----|-----------------------------------------------------------------------|
3 | Allocation Length |
-----|-----------------------------------------------------------------------|
4 | Allocation Length (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The RECEIVE command (Table 11-2) transfers data from the target to the
initiator.
The allocation length specifies the number of bytes that the initiator has
allocated for the returned data. An allocation length of zero indicates that
no data shall be transferred. This condition shall not be considered as an
error. Any other value indicates the maximum number of bytes that shall be
transferred. The target shall terminate the DATA IN phase when allocation
length bytes have been transferred or when all available data have been
transferred to the initiator, whichever is less.
11.2 SEND Command
Peripheral Device Type: Processor Devices
Operation Code Type: Mandatory
Operation Code: 0AH
Table 11-3
SEND Command
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 | Operation Code |
-----|-----------------------------------------------------------------------|
1 | Logical Unit Number | Reserved |
-----|-----------------------------------------------------------------------|
2 | Transfer Length (MSB) |
-----|-----------------------------------------------------------------------|
3 | Transfer Length |
-----|-----------------------------------------------------------------------|
4 | Transfer Length (LSB) |
-----|-----------------------------------------------------------------------|
5 | Vendor Unique | Reserved | Flag | Link |
==============================================================================
The SEND command (Table 11-3) transfers data from the initiator to the
target.
The transfer length specifies the length in bytes of data that shall be sent
during the DATA OUT phase. A transfer length of zero indicates that no data
shall be sent. This condition shall not be considered as an error.
13. Command Descriptions for Read-Only Direct-Access Devices
13.1 Group 0 Commands for Read-Only Direct-Access Devices. The Group 0
commands for read-only direct-access devices shall be as shown in Table 13-1.
Table 13-1
Group 0 Commands for Read-Only Direct-Access Devices
==============================================================================
Operation
Code Type Command Name Section
------------------------------------------------------------------------------
00H O TEST UNIT READY 7.1.1
01H O REZERO UNIT 8.1.1
02H V
03H M REQUEST SENSE 7.1.2
04H R
05H V
06H V
07H R
08H O READ 12.1.1
09H V
0AH R
0BH O SEEK 8.1.6
0CH V
0DH V
0EH V
0FH V
10H V
11H V
12H E INQUIRY 7.1.3
13H V
14H V
15H O MODE SELECT 12.1.3
16H O RESERVE 8.1.8
17H O RELEASE 8.1.9
18H O COPY 7.1.4
19H V
1AH O MODE SENSE 12.1.4
1BH O START/STOP UNIT 8.1.11
1CH O RECEIVE DIAGNOSTIC RESULTS 7.1.5
1DH O SEND DIAGNOSTIC 7.1.6
1EH O PREVENT/ALLOW MEDIUM REMOVAL 8.1.12
1FH R
==============================================================================
Key: M = Command implementation is mandatory.
E = Command implementation is required for SCSI devices that support
device-independent self-configuring software.
O = Command implementation is optional.
R = Operation code is reserved for future standardization.
V = Operation code is available for vendor unique commands.
13.2 Group 1 Commands for Read-Only Direct-Access Devices. The Group 1
commands for read-only direct-access devices shall be as shown in Table 13-2.
Table 13-2
Group 1 Commands for Read-Only Direct-Access Devices
==============================================================================
Operation
Code Type Command Name Section
------------------------------------------------------------------------------
20H V
21H V
22H V
23H V
24H V
25H E READ CAPACITY 8.2.1
26H V
27H V
28H M READ 12.2.1
29H V
2AH R
2BH O SEEK 8.2.4
2CH V
2DH V
2EH R
2FH O VERIFY 12.2.4
30H O SEARCH DATA HIGH 8.2.7.1
31H O SEARCH DATA EQUAL 8.2.7.2
32H O SEARCH DATA LOW 8.2.7.3
33H O SET LIMITS 8.2.8
34H R
35H R
36H R
37H R
38H R
39H O COMPARE 7.2.1
3AH O COPY AND COMPARE 7.2.2
3BH R
3CH R
3DH R
3EH R
3FH R
==============================================================================
Key: M = Command implementation is mandatory.
E = Command implementation is required for SCSI devices that support
device-independent self-configuring software.
O = Command implementation is optional.
R = Operation code is reserved for future standardization.
V = Operation code is available for vendor unique commands.
14. Status
A status byte shall be sent from the target to the initiator during the STATUS
phase at the termination of each command as specified in Tables 14-1 and 14-2
unless the command is cleared by an ABORT message, by a BUS DEVICE RESET
message, or by a "hard" RESET condition.
Table 14-1
Status Byte
==============================================================================
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Byte | | | | | | | | |
==============================================================================
0 |Reserved| Vendor Unique | Status Byte Code | V |
==============================================================================
Table 14-2
Status Byte Code Bit Values
==============================================================================
Bits of Status Byte
-----------------------------
7 6 5 4 3 2 1 0 Status(es) Represented
------------------------------------------------------------------------------
R V V 0 0 0 0 V GOOD
R V V 0 0 0 1 V CHECK CONDITION
R V V 0 0 1 0 V CONDITION MET/GOOD
R V V 0 0 1 1 V Reserved
R V V 0 1 0 0 V BUSY
R V V 0 1 0 1 V Reserved
R V V 0 1 1 0 V Reserved
R V V 0 1 1 1 V Reserved
R V V 1 0 0 0 V INTERMEDIATE/GOOD
R V V 1 0 0 1 V Reserved
R V V 1 0 1 0 V INTERMEDIATE/CONDITION MET/GOOD
R V V 1 0 1 1 V Reserved
R V V 1 1 0 0 V RESERVATION CONFLICT
R V V 1 1 0 1 V Reserved
R V V 1 1 1 0 V Reserved
R V V 1 1 1 1 V Reserved
==============================================================================
Key: R - Reserved bit
V - Vendor unique bit
A description of the status byte codes is given below:
GOOD. This status indicates that the target has successfully completed the
command.
CHECK CONDITION. Any error, exception, or abnormal condition that causes
sense data to be set, shall cause a CHECK CONDITION status. The REQUEST SENSE
command should be issued following a CHECK CONDITION status, to determine the
nature of the condition.
CONDITION MET. The SEARCH DATA commands shall return this status whenever a
search condition is satisfied. This status does not break a chain of linked
commands. The logical block address of the logical block that satisfies the
search may be determined with a REQUEST SENSE command.
BUSY. The target is busy. This status shall be returned whenever a target is
unable to accept a command from an initiator. The normal initiator recovery
action is to issue the command again at a later time.
INTERMEDIATE. This status shall be returned for every command in a series of
linked commands (except the last command), unless an error, exception, or
abnormal condition causes a CHECK CONDITION status or a RESERVATION CONFLICT
status to be set. If this status is not returned, the chain of linked
commands is broken; no further commands in the series are executed.
RESERVATION CONFLICT. This status shall be returned whenever an SCSI device
attempts to access a logical unit or an extent within a logical unit that is
reserved for that type of access to another SCSI device.
Appendixes (These Appendixes are not part of American National Standard
Small Computer System Interface, X3.131.198_, but are included
for information only.)
Appendix A
SCSI Signal Sequence Example
This appendix is included to provide an example of the timing of an SCSI
command that includes most of the SCSI bus phases (Figure A1). In this
example, the target does not disconnect from the SCSI bus prior to completing
the command.
The following notes apply to Figure A1:
GENERAL NOTE:
In a typical system, the computer's host adapter acts as the "initiator" and
the peripheral device's controller acts as the "target". In general, this
standard does not attempt to distinguish between a computer and its host
adapter. These functions may be separate or merged. The term "initiator"
encompasses both. Similarly, the term "target" does not distinguish between
the peripheral device and its controller, which may be separate or merged.
The term "SCSI device" refers to a device that may be connected to the SCSI
bus. An SCSI device may act as in the initiator role, the target role, or
both roles.
TIMING NOTES:
Bus Settle Delay. The minimum time to wait for the SCSI bus to settle after
changing certain control signals.
Bus Free Delay. The minimum time that an SCSI device must wait from its
detection of BUS FREE phase until it may assert BSY and its ID bit.
Bus Set Delay. The maximum time that an SCSI device may wait to assert BSY
and its ID bit after BUS FREE phase was last detected if it intends to
participate in the ARBITRATION phase.
Bus Clear Delay. The maximum time for an SCSI device to stop driving all
signals after BUS FREE phase is detected, after SEL is received during
ARBITRATION phase, or after RST becomes true.
Arbitration Delay. The minimum time that an SCSI device must wait after
asserting BSY for arbitration until it may examine the DATA BUS to determine
whether it won. There is no maximum time.
DATA BUS NOTES:
(1) DB(7) is the most significant bit.
(2) DB(7) is the highest priority arbitration bit.
(3) DB(P) is the data parity bit (odd). Parity is not valid during the
ARBITRATION phase. Use of parity is a system option (i.e., a system is
configured so that all SCSI devices on a bus generate parity and have parity
detection enabled, or all SCSI devices have parity detection disabled or not
implemented).
BUS PHASE NOTES:
BUS FREE phase. BUS FREE phase begins when SEL and BSY are both continuously
false for a bus settle delay. It ends when SEL or BSY becomes true.
ARBITRATION phase. Implementation of this phase is optional. If there is
more than one initiator, then all initiators must implement this phase.
Targets that do not implement this phase cannot disconnect from the bus until
the command has completed. SCSI devices that implement the COPY command must
implement ARBITRATION phase.
At least one bus free delay after first detecting BUS FREE phase, but no
more than a bus set delay after the bus was last free, the initiator asserts
BSY and its assigned SCSI device ID bit on the DATA BUS. The initiator waits
an arbitration delay, then examines the DATA BUS. If a higher priority SCSI
device ID bit is true, the initiator loses arbitration and releases BSY and
its ID bit. Otherwise, the initiator wins arbitration and asserts SEL. SCSI
devices must release BSY and their ID bit within a bus clear delay after SEL
becomes true (even if they have not yet examined the DATA BUS).
The winning SCSI device waits at least a bus clear delay plus a bus settle
delay after asserting SEL before changing any signals on the bus.
SELECTION phase. The I/O signal is false during this phase to distinguish it
from the RESELECTION phase.
NON-ARBITRATING SYSTEMS: In such systems, the initiator waits at least a
bus clear delay after detecting BUS FREE phase, then it asserts the target's
ID bit and, optionally, the initiator's ID bit on the DATA BUS. After at
least two deskew delays, the initiator asserts SEL.
ARBITRATING SYSTEMS: In such systems, the SCSI device that won arbitration
has both BSY and SEL asserted. After at least a bus clear delay plus a bus
settle delay, it places both the target's and the initiator's ID bits on the
DATA BUS. At least two two deskew delays later, it releases BSY.
ALL SYSTEMS: The target determines that it is selected when SEL and its
SCSI ID bit are true and BSY and I/O are false for at least a bus settle
delay. The target then asserts BSY within a selection abort time after it
last determined that it was still being selected. (The target is not required
to respond to a selection within a selection abort time; but it must insure
that it will not assert BSY more than a selection abort time after the
initiator aborts a selection attempt.)
At least two deskew delays after the initiator detects BSY true, it releases
SEL and may change or release the DATA BUS.
COMMAND phase. The target asserts C/D and negates I/O and MSG for all of the
bytes transferred during this phase. The direction of transfer is from the
initiator to the target.
HANDSHAKE PROCEDURE: The target asserts REQ. Upon detecting REQ true, the
initiator drives the DATA BUS to the desired value, waits at least one deskew
delay plus a cable skew delay and then asserts ACK. The initiator continues
to drive the DATA BUS until REQ is false.
When ACK is true at the target, the target reads the DATA BUS and then
negates REQ.
When REQ becomes false at the initiator, the initiator may change or release
the DATA BUS and negate ACK.
The target may continue to request command bytes by asserting REQ again.
The number of command bytes is determined by the group code (most significant
3 bits) that is contained in the first command byte.
DATA IN phase. The target asserts I/O and negates C/D and MSG for all of the
bytes transferred during this phase. The direction of transfer is from the
target to the initiator.
HANDSHAKE PROCEDURE: The target first drives the DATA BUS to their desired
values, waits at least one deskew delay plus a cable skew delay, and then
asserts REQ. The target continues to drive the DATA BUS until ACK is true.
When REQ is true at the initiator, the initiator reads the DATA BUS and then
asserts ACK.
When ACK is true at the target, the target may change or release the DATA
BUS and negate REQ.
When REQ is false at the initiator, the initiator negates ACK. After ACK is
false, the target may continue the transfer by driving the DATA BUS and
asserting REQ as described above.
DATA OUT phase (not shown in the figure). The target negates C/D, I/O, and
MSG for all of the bytes transferred during this phase. The direction of
transfer is from the initiator to the target. (Refer to the handshake
procedure and the timing chart for the COMMAND phase.)
STATUS phase. The target asserts C/D and I/O and negates MSG for the byte
transferred during this phase. The direction of transfer is from the target
to the initiator. (Refer to the handshake procedure and the timing chart for
the DATA IN phase.)
MESSAGE phase. The target C/D, I/O, and MSG during the byte transferred
during this phase. Typically, a COMMAND COMPLETE message would be sent at
this point. The direction of transfer is from the target to the initiator.
(Refer to the handshake procedure and the timing chart for the DATA IN phase.)
BUS FREE phase. The target returns to BUS FREE phase by releasing BSY. Both
the target and the initiator release all bus signals within a bus clear delay
after BSY is continuously false for a bus settle delay.
Appendix B
Typical Bus Phase Sequence
This appendix is included to provide an example of the SCSI bus phase sequence
for a typical READ command (Tables B1 and B2). In this example, the target
does not disconnect from the SCSI bus prior to completing the command.
Table B1
Typical READ Command Phase Sequence
==============================================================================
Signals
---------------------------------------------------------------
B S A M C I R A R D D
S E T S / / E C S B B
Bus Phase Y L N G D O Q K T (7-0) (P) Comment
------------------------------------------------------------------------------
BUS FREE - - - - - - - - - - - SCSI bus is available.
ARBITRATION 1 - - - - - - - - ID X Initiator tries to get
" 1 the SCSI bus.
SELECTION 1 1 1 - - - - 0 - ID I,T V Initiator has SCSI bus
" - 1 ID I,T V and selects a target.
" 1 1 ID I,T V ATN is on.
" 1 - X X
MESSAGE OUT 1 - 1 1 1 0 0 0 - X X Target has control of
" 1 1 0 X X the bus and gets the
" 1 1 0 X X IDENTIFY message from
" 1 1 1 Message V the initiator.
" 1 0 1 X X
" 0 0 0 X X
COMMAND 1 - 0 0 1 0 0 0 - X X Target gets a command
" 1 0 X X from the initiator.
" 1 1 Command V (This phase is repeated
" 0 1 X X for each byte.)
" 0 0 X X
==============================================================================
Table B2
Typical READ Command Phase Sequence (Continued)
==============================================================================
Signals
---------------------------------------------------------------
B S A M C I R A R D D
S E T S / / E C S B B
Bus Phase Y L N G D O Q K T (7-0) (P) Comment
------------------------------------------------------------------------------
DATA IN 1 - 0 0 0 1 0 0 - X X Target sends data to
" 1 0 Read Data V the initiator. (This
" 1 1 X X phase is repeated for
" 0 1 X X each byte.)
" 0 0 X X
STATUS 1 - 0 0 1 1 0 0 - X X Target sends status to
" 1 0 Status V the initiator.
" 1 1 X X
" 0 1 X X
" 0 0 X X
MESSAGE IN 1 - 0 1 1 1 0 0 - X X Target sends a COMMAND
" 1 0 Message V COMPLETE message to the
" 1 1 X X initiator.
" 0 1 X X
" 0 0 X X
BUS FREE - - - - - - - - - - - SCSI bus is available.
==============================================================================
Key: - = Signal driver is passive.
0 = Signal is false.
1 = Signal is true.
"Blank" = Signal state is the same as the previous line.
ID = SCSI ID for arbitration.
ID I,T = SCSI ID of initiator and target.
V = Parity is valid.
X = The signal is not guaranteed to be in a known state.
Appendix C
SCSI System Operation
This appendix is included to provide an explanation of the relationship of the
various pieces of an SCSI system. This appendix also provides additional
information about the use of SCSI in a multi-tasking system. Such systems
typically use a host adapter printed-circuit board to interface from the host
memory to the SCSI bus. Although other architectures are possible (including
native or imbedded SCSI), the host adapter logic still exists as part of the
system. The term "initiator" is used throughout this standard to encompass
all such architectures. The term "host adapter" is used within this appendix
to refer to the logic that interfaces from the host memory to the SCSI bus.
C1. Host Memory / Host Adapter / SCSI Controller Relationship
The SCSI architecture utilizes the concept of host memory blocks for command,
data, and status interchange between the host system and the SCSI controller.
In the middle of this exchange is the SCSI host adapter, which acts as the
SCSI peripheral's gateway into host memory. The host adapter is an important
portion of the overall intelligence of SCSI. Along with providing an
information path from the SCSI bus to the host bus, the host adapter is
intimately involved in assuring data integrity and proper performance of the
I/O subsystem.
In order to fully understand SCSI operation, the concepts of I/O memory
blocks and logical threads must be detailed. Figure C1 presents a block
diagram of a single host/single peripheral SCSI I/O subsystem. The host
memory contains three I/O blocks: command, data, and status. The SCSI
controller needs to read the command block and write to the status block in
order to perform the task specified by the host (in the command block).
Likewise, the controller needs to both read and write the data block. As was
previously mentioned, the SCSI controller "reaches into host memory" via the
SCSI host adapter. The host adapter must know the addresses of the command,
data, and status blocks in order for it to "reach" into the right spot in
memory. In other words, the host adapter must be given a pointer to the start
of each block by the host. As the SCSI controller takes information from the
command block, the memory pointer for the command block advances to the
next byte. The same is true for the data and status pointers.
SCSI architecture provides for two sets of three pointers within the host
adapter. The first set is known as the current (or active) pointer values.
These are the pointers to the next command, data, or status byte to be
transferred between the host memory and the SCSI controller. There is only
one set of current pointers in the host adapter. The current pointers are
shared amoung all devices and are used by the current device connected to the
host adapter. The second set is known as the saved pointer values. There is
one set of saved pointers for each supported logical thread. For command and
status, these pointers always point to the start of the memory command block
and memory status block. The saved data pointer points to the start of the
data block at the beginning of the SCSI command. It remains at this value
until the controller sends a SAVE DATA POINTER message to the host adapter
which in turn saves the value of the current data pointer. The controller may
retrieve the saved value by sending a RESTORE POINTERS message. This moves
the saved value of each pointer into the current pointer registers. Whenever
an SCSI device disconnects from the bus, only the saved pointer values are
retained. The current pointer values are set from the saved values upon the
next reconnection. The current and saved pointers provide an efficient means
of error retry and recovery during large data exchanges on the SCSI bus.
C2. SCSI READ Command Example
One method to understanding the host/host adapter/SCSI peripheral relationship
is via an example. Let us consider the case of a multiple sector READ command
that will cross a cylinder boundary on a direct-access device such as a disk.
The first activity in the I/O operation is for the system to create a
command descriptor block in memory and determine where the data and status are
to be written in host memory. The host then sends a command to the host
adapter that includes the starting address (pointer) for each of the command,
data, and status blocks and the SCSI address of the peripheral to perform the
operation. In this example, there is only one SCSI controller and physical
disk, but its address is required in order for the host adapter to select it.
Upon receiving the command, the host adapter arbitrates for the SCSI bus and
wins (due to the lack of competing devices) and proceeds to select the target
SCSI device with the ATN signal asserted. The ATTENTION condition indicates
to the SCSI target that the initiator (the host adapter) has a message to send
to the target.
After the SELECTION phase is completed, the disk controller responds to the
initiator's ATTENTION condition by receiving a message from the initiator.
This message, generated by the host adapter, indicates the desired logical
unit number in the target and whether the initiator can support bus
disconnect. In this example, the initiator supports disconnect.
Input/output activity from this point will be controlled entirely by the
target. The host adapter is simply an "arm" of the target used to reach into
host memory. Utilizing this arm, the target reads in the command descriptor
block (CDB).
After decoding the instruction, the controller determines that a disk seek
is required to get the starting data block. Since the SCSI bus will not be
utilized until data has been read from the disk, the target controller
disconnects from the bus. The disconnect process includes the transmission of
a SAVE DATA POINTER message and DISCONNECT message from the target to the host
adapter. The host adapter responds to the SAVE DATA POINTER message by saving
the current data pointer, which is still set to the start of the data block.
After transmission of the DISCONNECT message the target will release BSY,
freeing the bus.
Although the initiator host adapter and target disk controller are
disconnected, they are logically connected or, "threaded", together. Both
devices know they have a command to finish and will return to that job at a
later point in time. The principle of logical threads allows many I/O
commands to execute in the system simultaneously, utilizing a single physical
bus. The thread is actually not between the host adapter and the disk
controller, but runs all the way from the host memory I/O block to the
peripheral device performing the operation. (See Figure C2 for a pictorial
presentation of this concept.)
Once the target has started filling its data buffers, it can transmit data
to the initiator, but first it must reestablish the physical path. The
reselection process involves the target arbitrating for the bus and
reselecting the host adapter. After the physical reconnection is made, the
target sends an IDENTIFY message to the host adapter to indicate which target
logical unit is reconnecting. This information provides reconnection, to the
correct thread into host memory. After reconnection, the roles of the
initiator and target are just as they were prior to disconnect. The target
transfers data into host memory via the host adapter. The data transfer
continues until the disk reaches the end of its cylinder and the disk
controller determines that a second physical seek is required to complete the
READ command. The target again performs a SAVE DATA POINTER message and a
DISCONNECT message. However, this time the current data pointer is not at the
beginning of the memory data block. The saved value at disconnect reflects
the change.
After seek completion and transfer of data into its buffer, the controller
reconnects to the host adapter and completes the data transfer as requested by
the READ command. At this point, the controller sends ending status into host
memory via the host adapter. The final action of the target is to send to the
host adapter a COMMAND COMPLETE message and disconnect from the SCSI bus. The
target has completed its operation and considers the logical thread broken.
Upon receipt of the COMMAND COMPLETE message, the host adapter signals the
host that the I/O command is complete. This signal can be an interrupt or the
setting of a flag read by the host in a polled I/O environment. This action
by the host adapter breaks the thread between the host adapter and the I/O
memory blocks of the host. The host reviews the status of the operation in
the status block and proceeds to utilize the data transferred into the data
block.
C3. I/O Channel Concept
The I/O channel concept fully utilizes the high performance capability of
SCSI. The I/O channel is basically an intelligent SCSI host adapter that can
maintain multiple simultaneous threads between host memory I/O blocks and
different SCSI devices.
The I/O channel utilizes a single direct memory access (DMA) path into host
memory supporting the DMA operations of numerous SCSI peripherals. Since the
SCSI bus is a single physical bus and most host computers have a single
physical backplane bus, multiple DMA channels into memory are not necessary.
In many implementations of a multiple DMA channel architecture, when a channel
is accessing memory, all other channels are idle. In such implementations, a
single channel supporting multiple threads can supply the same performance as
separate DMA peripherals. An obvious advantage to the host is lower system
cost as well as the saving in backplane card slots.
In the READ command example discussed in Section C2, the I/O channel is the
SCSI host adapter. The host gives the I/O channel a command by providing it
with pointers to the I/O memory blocks and the SCSI peripheral address. This
establishes a thread between the host adapter and the host I/O memory blocks.
The I/O channel then opens a subchannel that is assigned the task of managing
the physical link and logical thread between the host adapter and the target
controller. All physical connections and reconnections to the host adapter
are managed by this subchannel. The number of active or open subchannels an
I/O channel can support is totally dependent upon its design. The SCSI
definition could, in theory, support an I/O channel with up to 56 subchannels
(14,336 subchannels, if the EXTENDED IDENTIFY message is implemented).
Appendix D
Recommended Shielded Connectors
Three alternative shielded connector systems are defined by this appendix.
For each alternative, the connector shielding system shall provide a dc
resistance of less than 10 milliohms from the cable shield at its termination
point to the SCSI device enclosure.
In order to support daisy-chain connections, SCSI devices that use shielded
connectors should provide two shielded device connectors on the device
enclosure. These two connectors may be wired "one-to-one" with a stub to the
SCSI device's drivers and receivers provided the maximum stub length is not
violated. Alternatively, two cables may be run from the two shielded
connectors to the drivers and receivers so that the maximum stub length is not
violated. The length of the cable within the device enclosure is included
when calculating the total cable length of the SCSI bus.
D1 Shielded Connector, Alternative 1. The shielded cable connector
(Figure D1) shall be a 50-conductor connector consisting of two rows of 25
female contacts with adjacent contacts 2.54 mm (0.1 in) apart. The nonmating
portion of the connector is shown for reference only.
The shielded SCSI device connector (Figure D2) shall be a 50-conductor
connector consisting of two rows of 25 male pins with adjacent pins 2.54 mm
(0.1 in) apart. The nonmating portion of the connector is shown for reference
only.
The connector pin assignments shall be as shown in Table 4-1 for single-
ended drivers and as shown in Table 4-2 for differential drivers.
D2 Shielded Connector, Alternative 2. The shielded device connector
(Figure D3) shall be a 50-conductor connector consisting of two rows of ribbon
contacts spaced 2.16 mm (0.085 in) apart. The nonmating portion of the
connector is shown for reference only. FCC document Part 68 Subpart F 68.500
should be used for reference.
The shielded cable connector (Figure D4) shall be a 50-conductor connector
consisting of two rows of ribbon contacts spaced 2.16 mm (0.085 in) apart. The
nonmating portion of the connector is shown for reference only.
The connector pin assignments shall be as shown in Table D1 for single-ended
drivers and as shown in Table D2 for differential drivers.
D3 EUROCARD Boxes For boards in EUROCARD boxes (IEC 297 or DIN 41494) the
EMI-screen may be in the front of the boards and in this case a screened cable
and connector may be attached through the front panel to the board connector
specified in section 4.3. It is thereby possible to use the flat ribbon cable
specified in this standard or the shielded cable, as required by users.
Figure D1a. Female Shielded SCSI Cable Connector, Alternative 1
==============================================================================
Dimensions Millimeters Inches
------------------------------------------------------------------------------
A1 60.96 + 0.15 2.400 + 0.006
A2 66.29 + 0.18 2.610 + 0.007
A3 2.54 + 0.15 0.100 + 0.006
A4 2.54 + 0.15 0.100 + 0.006
A5 8.56 + 0.41 0.337 + 0.016
A6 11.93 Minimum 0.470 Minimum
A7 65.02 + 0.18 2.560 + 0.007
A8 5.46 0.215
A9 4.14 + 0.25 0.163 + 0.010
A10 60.20 Maximum 2.370 Maximum
A11 6.60 0.260
A12 1.27 Maximum 0.050 Maximum
A13 0.64 Maximum 0.025 Maximum
A14 6.604 + 0.25, - 0.13 0.260 + 0.010, - 0.005
A15 13.46 0.530
A16 12.45 + 0.38 0.490 + 0.015
==============================================================================
NOTES:
(1) Fifty Contacts on 2.54-mm (0.100-inch) spacing = 60.96 mm (2.40 inch).
(2) Tolerances +_ 0.127 mm (0.005 inch) noncumulative, unless specified
otherwise.
Figure D1b. Female Shielded SCSI Cable Connector, Alternative 1
Figure D2a. Male Shielded SCSI Device Connector, Alternative 1
==============================================================================
Dimensions Millimeters Inches
------------------------------------------------------------------------------
B1 66.65 + 0.15 2.624 + 0.006
B2 65.28 2.570
B3 0.69 0.027
B4 5.77 + 0.81 0.227 + 0.032
B5 9.14 0.360
B6 3.30 0.130
B7 2.54 0.100
B8 2.54 0.100
B9* 2.84 0.112
B10 0.15 0.006
B11 0.38 0.015
B12 8.15 + 0.76, - 0.48 0.321 + 0.030, - 0.019
B13 0.64 + 0.02 0.025 + 0.001
B14* 0.64 Square 0.025 Square
B15 78.84 3.104
B16* 5.77 0.227
B17* 2.92 0.115
B18 4.83 0.190
B19* 3.18 0.125
B20* 1.52 0.060
B21 67.31 2.650
B22 9.65 0.380
==============================================================================
NOTES:
(1) Fifty Contacts on 2.54-mm (0.100-inch) spacing = 60.96 mm (2.40 inch).
(2) Tolerances + 0.127 mm (0.005 inch) noncumulative, unless specified
otherwise.
(3) Dimensions listed with asterisks (*) are shown for reference only.
Figure D2b. Male Shielded SCSI Device Connector, Alternative 1
Figure D3. Shielded SCSI Device Connector, Alternative 2
Figure D4. Shielded SCSI Cable Connector, Alternative 2
Table D1
Single-Ended Pin Assignments
(Shielded Connector, Alternative 2)
==============================================================================
Signal Pin Number
------------------------------------------------------------------------------
-DB(0) 26
-DB(1) 27
-DB(2) 28
-DB(3) 29
-DB(4) 30
-DB(5) 31
-DB(6) 32
-DB(7) 33
-DB(P) 34
GROUND 35
GROUND 36
GROUND 37
TERMPWR 38
GROUND 39
GROUND 40
-ATN 41
GROUND 42
-BSY 43
-ACK 44
-RST 45
-MSG 46
-SEL 47
-C/D 48
-REQ 49
-I/O 50
==============================================================================
NOTES:
(1) Pins 1_12 and 14_25 shall be connected to ground. Pin 13 should be left
open. Some products designed prior to the generation of this standard
connected this pin to ground.
(2) The minus sign next to the signals indicates active low.
Table D2
Differential Pin Assignments
(Shielded Connector, Alternative 2)
==============================================================================
Signal Name Pin Number Signal Name
------------------------------------------------------------------------------
SHIELD GROUND 1 26 GROUND
+DB(0) 2 27 -DB(0)
+DB(1) 3 28 -DB(1)
+DB(2) 4 29 -DB(2)
+DB(3) 5 30 -DB(3)
+DB(4) 6 31 -DB(4)
+DB(5) 7 32 -DB(5)
+DB(6) 8 33 -DB(6)
+DB(7) 9 34 -DB(7)
+DB(P) 10 35 -DB(P)
DIFFSENS 11 36 GROUND
GROUND 12 37 GROUND
TERMPWR 13 38 TERMPWR
GROUND 14 39 GROUND
+ATN 15 40 -ATN
GROUND 16 41 GROUND
+BSY 17 42 -BSY
+ACK 18 43 -ACK
+RST 19 44 -RST
+MSG 20 45 -MSG
+SEL 21 46 -SEL
+C/D 22 47 -C/D
+REQ 23 48 -REQ
+I/O 24 49 -I/O
GROUND 25 50 GROUND
==============================================================================
NOTE:
(1) SHIELD GROUND is optional on some cables. (Implementors note: Some
shielded flat ribbon cables use pin 1 as a connection to the shield.)
Appendix E
Conformance
This appendix contains recommendations on conformance statements to this
standard.
E1. Alternatives
This standard contains various alternatives that are mutually exclusive within
a system.
(1) Single-ended or differential drivers.
(2) Termination power supplied by the cable or not.
(3) Parity implemented or not.
(4) "Hard" RESET or "soft" RESET.
(5) Reservation queuing implemented or not.
E2. Levels of Conformance
By specifying which alternatives (listed above) are implemented, an
environment is created enabling different features to be implemented. These
features are divided into three nested minimum levels as shown in Table E1.
Table E1
Levels of Conformance
==============================================================================
Level Initiator Target
------------------------------------------------------------------------------
0 Accept COMMAND COMPLETE Implement the mandatory commands
message. of section 7.
Accept GOOD and CHECK Implement the mandatory commands
CONDITION status codes. of the supported device type(s).
Implement the COMMAND COMPLETE
message.
If messages other than COMMAND
COMPLETE are implemented, then
implement MESSAGE REJECT message
also.
Implement GOOD and CHECK CONDITION
statuses.
------------------------------------------------------------------------------
1 Same as above plus Same as above.
ARBITRATION phase.
------------------------------------------------------------------------------
2 Same as above plus Same as above plus implement the
accept DISCONNECT, MESSAGE REJECT and IDENTIFY messages
MESSAGE REJECT, and implement all extended commands
IDENTIFY, and SAVE in section 7 and for the supported
DATA POINTER messages device type(s).
==============================================================================
E3. Options
E3.1 Optional Commands. This standard specifies a number of additional
commands that can be implemented in each level. Some of these commands, if
implemented, require the implementation of other optional commands, messages,
or both. In this case, these additional commands, messages, or both shall
also be implemented.
E3.2 Optional Messages. This standard specifies a number of additional
optional messages that may be implemented at any level.
E3.3 Other options. Within some commands, additional features, called
"options", are described. These options need not necessarily be implemented.
E4. Statement of Conformance
Any statement of conformance to this standard should declare which of the
alternates listed in section E1 and which of the three conformance levels are
implemented. In addition, it should indicate which of the options listed in
section E3 are implemented, if any. In the case of optional messages, the
conformance statement should state whether the message is generated, accepted,
or both.
If the synchronous data transfer option is implemented, any statement of
conformance should so indicate and state both the maximum REQ/ACK offset and
the minimum transfer period implemented.
Appendix F
Additional Medium Type and Density Code Standards
In sections 8 and 9 of this standard, the MODE SELECT and MODE SENSE commands
define medium type codes and density codes for certain flexible disks and
magnetic tapes. ANSI standards or X3 draft documents are referenced for code
values if a standard or draft document exists for that code value. In many
cases, other standards also exist for a code value. Tables F1 and F2 in this
appendix provide references to those standards for these code values.
DISCLAIMER: It is not the purpose of this appendix to indicate that these
standards are exactly equivalent to each other. However, these standards may
be applicable. Please refer to sections 8 and 9 for additional information
concerning the medium type or density code.
Table F1
Direct-access Medium Type Codes
==============================================================================
Code Value Medium Type
---------- ------------------------------------------------------------------
00H-02H See section 8.
Flexible Disk Reference Standard(s)
------------------------------------------------------------------
05H X3.73-1980, ECMA-54, ISO 5654/1-1984, ISO 5654/2-1982
06H X3B8-140, ECMA-59
09H X3B8/78-139
0AH X3.121-1984, ECMA-69, ISO 7065/1-1985, ISO 7065/2-1985
0DH X3.82-1980, ECMA-66, ISO 6596/1-1985, ISO 6596/2-1985
12H X3.125-1984, ECMA-70, ISO 7487/1-1985, ISO 7487/2-1985,
ISO 7487/3-1985
16H X3.126-198X, ECMA-78, DIS 8378/1, DIS 8378/2, DIS 8378/3
1AH X3B8/85-199, ECMA-99, DIS 8630/1, DIS 8630/2
1EH X3.137-198X, ECMA-100, DIS 8860/1, DIS 8860/2
Direct-access Magnetic Tape Standard(s)
------------------------------------------------------------------
40H X3B5/85-138 (Note 1), ECMA TC19/83/39
44H X3B5/85-138 (Note 1), ECMA TC19/83/39
80H _ FFH Vendor unique
All others Reserved
==============================================================================
NOTE:
(1) The referenced standard is for unrecorded miniature cartridge media.
The usage referred to here is for serial GCR recording using a format known as
QIC-100. Since X3B5 issues a new document number for each revision of their
working draft document, please contact the Chairman of X3B5 for the latest
document number.
Table F2
Sequential-access Density Codes
==============================================================================
Code Value Density
---------- ------------------------------------------------------------------
00H See section 9.
Magnetic Tape Reference Standard(s)
------------------------------------------------------------------
01H X3.22-1983, ECMA-62
02H X3.39-1973 ECMA-62
03H X3.54-1976, ECMA-62
04H Old format known as QIC-11
05H X3.136-198X, ECMA-98
06H X3B5/85-98 (Note 1)
07H X3.116-198X, ECMA-79
08H X3B5/85-77 (Note 1)
09H X3B5/85-76 (Note 1)
0AH
0BH X3.55, X3.56-198X, ECMA-46, ISO 4057-1979
80H _ FFH Vendor unique
All others Reserved
==============================================================================
NOTES:
(1) Working Draft. X3B5 assigns a new document number to each revision of
their documents. Please contact the Chairman of X3B5 for the latest document
number.
Appendix G
Future Standardization
This appendix is included to provide insight into some possible future
extensions to SCSI that are being considered by X3T9.2. Although X3T9.2 has
addressed some of these extensions, many details remain to be resolved.
Further work by X3T9.2 may result in changes or additions to these extensions.
Please contact the Chairman of X3T9.2 for the current status of this activity.
Six new commands are being considered, three for targets that support
caching, one to provide a means to read the medium defect data, and two to
provide a standardized method for writing and reading the target's data buffer
(principally intended to support start-of-day tests that insure data path
integrity). The tentative operation codes are as follows:
==============================================================================
Operation
Code Type Command Name Device Types
------------------------------------------------------------------------------
34H O PRE-FETCH \ Direct Access, Write-Once
35H O FLUSH CACHE > Read-Multiple, and
36H O LOCK/UNLOCK CACHE / Read-Only Direct Access
37H O READ DEFECT DATA Direct Access
3BH O WRITE BUFFER All
3CH O READ BUFFER All
------------------------------------------------------------------------------
New parameters are being considered in several of the existing commands:
(1) Cache control bits are being considered for bits 3 and 4 of byte 1 in
several group 1 commands, including READ, WRITE, WRITE AND VERIFY, and VERIFY.
(2) Byte 1 of the Defect List in the FORMAT UNIT command may be used to
provide additional defect management control.
(3) Bits 0 _ 3 of byte 3 of the Inquiry Data in the INQUIRY command may be
used to identify that the device supports certain additions to the standard.
One such addition that is being considered is optional fields within the
Inquiry Data to identify the manufacturer and the product model information.
(4) Extensions to the MODE SELECT and MODE SENSE commands are being
considered to provide a standard means to control certain target parameters.
Bits 0 _ 5 of byte 2 of the MODE SENSE command are being considered for use in
controlling which target parameters are returned by this command.
Comments
Post a Comment