8. Direct-Access Devices 8.1. Direct-Access Device Model Direct-access devices store blocks of data for later retrieval. Each block of data is stored at a unique logical block address. An initiator issues WRITE commands to store the blocks of data (write operations) and READ commands to retrieve the blocks of data (read operations). Other commands issued by the initiator to may also cause write and read operations to occur. A write operation causes a block of data to be written on the medium. A read operation causes a block of data to be read from the medium. A verify operation causes a block of data to be verified that it can be read without error from the medium. Blocks of data are stored by a process that causes localized changes or transitions within the medium. The changes made to the medium to store the blocks of data may be volatile (i.e., not retained through power cycles) or non-volatile (retained through power cycles). The medium has may be divided in parts that are used to data blocks, parts that are reserved as spares for defect handling, and parts that are reserved for use by the controller for the management of the device. 8.1.1. Removable Medium The medium may be removable (i.e., a typically used in a floppy disk drive) or non-removable (i.e., typically used in a hard disk drive). Removable medium is contained within a cartridge (or jacket) to prevent damage to the recording surfaces. The combination of medium and cartridge is often called a volume. A volume has an attribute of being mounted or demounted on a suitable transport mechanism. A volume is mounted when the direct-access device is capable of performing write or read operations to the medium. A mounted volume may be not be accessible by an initiator if it is reserved by another initiator. A volume is demounted at any other time (e.g., during loading, unloading, or storage). An initiator may check whether a volume is mounted by issuing a TEST UNIT READY command. A volume that is loaded may need a START STOP UNIT command issued to become accessible for write or read operations. The PREVENT ALLOW MEDIUM REMOVAL command allows an initiator to restrict the demounting of the volume. This is useful in maintaining system integrity. If the direct-access device implements cache memory, it must ensure that all logical blocks of the medium contain the most recent data prior to permitting demounting of the volume. If the initiator issues a START STOP UNIT command to eject the cartridge, and the direct-access device is prevented from demounting by the PREVENT ALLOW MEDIUM REMOVAL command, the START STOP unit command is rejected by the direct-access device. 8.1.2. Logical Blocks Blocks of data are stored on the medium along with additional information that the controller uses to manage the storage and retrieval. The format of the additional information is unique and is hidden from the initiator during normal read or write operations. This additional information is often used to identify the physical location of the blocks of data, the address of the logical block, and to provide protection against the loss of the user data. The address of the first logical block is zero. The address of the last logical block is [n-1], where [n] is the number of logical blocks available on the medium. A READ CAPACITY command may be issued to determine the value of [n-1]. If a command is issued which requests access to a logical block not within the capacity of the medium the command is terminated with CHECK CONDITION. The number of bytes of data contained in a logical block is known as the block length. Each logical block has a block length associated with it. The block length may be different for each logical block on the medium. However, in a typical device only one block length is used at a time. The block descriptor in the MODE SENSE data describes the block lengths that are used on the medium. An MODE SELECT command can be used to setup extents. An extent is a specified number of logical blocks that have the specified block length. The FORMAT UNIT command is typically required to change the block length of devices that support variable block lengths and make the extents that were setup active. The location of a logical block on the medium does not have a relationship to the location of any other logical block. However, in a typical device the logical blocks are located in an ascending order. The time to access the logical block at address [x] and then the logical block at address [x+1] may not be less than time to access [x] and then [x+100]. The READ CAPACITY with a PMI bit of one is useful in determining where longer access times occur. 8.1.3. Ready State A direct-access device is ready when medium access commands can be executed. A device using removable media is usually not ready until a volume is mounted. Such a device normally returns CHECK CONDITION status and sets the sense key to NOT READY. A direct-access device may be switched from being ready to being not ready by using the START STOP UNIT command. An initiator may need to issue a START UNIT command to bring a device ready. 8.1.4. Initialization Many direct-access devices must be initialized prior to write or read operations. This initialization is usually performed by a FORMAT UNIT command. Parameters related to the geometry and performance characteristics can be set with the MODE SELECT command prior to the format operation. Some devices are initialized by means not specified in this standard. The time at which this occurs is specific to the implementation of the direct-access device. Devices using non-volatile medium typically save the parameters and only need to be initialized once. However, some mode parameters may need to be initialized after each power-on and reset. A catastrophic failure of the direct-access device may require the FORMAT UNIT command to be reissued. Devices that do not use non-volatile medium may need to be initialized at each power-on prior read or write operations being performed. Mode parameters may also need initialization. 8.1.5. Medium Defects Any medium has the potential for defects which can cause user data to be lost. Therefore, each logical block may contain information which allows the detection of changes to the user data caused by defects in the medium or other phenomena, and may also allow the data to be reconstructed following the detection of such a change. On some devices, the initiator has some control some through use of the mode parameters. Some devices may allow the initiator to examine and modify the additional information by using the READ LONG and WRITE LONG commands. Some media having a very low probability of defects may not require these structures. Defects may also be detected and managed during execution of the FORMAT UNIT command. The FORMAT UNIT command defines four sources of defect information. These defects may be reassigned or avoided during the initialization process so that they do not appear in a logical block. Defects may also be avoided after initialization. The initiator issues a REASSIGN BLOCKS command to request that the specified logical block address be reassigned to a different part of the medium. This operation can be repeated if a new defect appears at a later time. The total number of defects that may be handled in this manner can be specified in the mode parameters. Defect management on direct-access devices is usually vendor specific. Devices not using removable medium typically optimize the defect management for capacity or performance or both. Devices that use removable medium typically do not support defect management (e.g., some floppy disk drives) or use defect management that is based on the ability to interchange the medium. 8.1.6. Data Cache Some direct-access devices implement cache memory. A cache memory is usually an area of temporary storage in the direct-access device with a fast access time that is used to enhance performance. It exists separately from the blocks of data stored and is normally not directly accessible by the initiator. Use of cache memory for write or read operations typically reduces the access time to a logical block and can increase the overall data throughput. During read operations the direct-access device uses the cache memory to keep blocks of data that the initiator may request at some future time. The algorithm used to manage the cache memory is not part of this standard. However, there are parameters provided by which the initiator may advise the direct-access device about its future requests, or restrict the use of cache memory for a particular request. During write operations the direct-access device uses the cache memory to buffer data for later storage on the medium. This is typically called a write-back caching algorithm. Thus the command may complete prior to blocks of data being written to the medium. As a result of using write-back caching there is a period of time during which the blocks of data may be lost due to a power or hardware failure. There is also the possibility of an error occurring during the write operation. If an error occurred during the write, it may be reported as a deferred error on a later command. However, there are parameters provided by which the the initiator may request the use of write- through caching thereby preventing these circumstances from arising. When the cache memory fills up with blocks of data that are being kept for possible future access, new blocks of data that are to be kept must replace those currently in cache memory. The disable page out (DPO) bit is used to control replacement of logical blocks in the cache. For write operations, setting this bit to one advises the direct-access device to not replace existing blocks in the cache memory with the write data. For read operations, setting this bit to one causes blocks of data that are being read to not replace existing ones in the cache memory. Sometimes the initiator may wish to have the blocks of data read from the medium instead of from the cache memory. The force unit access (FUA) bit is used to indicate that the direct-access device shall access the physical medium. For a write operation, setting FUA to one causes the direct-access device to complete the data write to the physical medium before completing the command. For a read operation, setting FUA to one causes the logical blocks to be retrieved from the physical medium. Note that when the DPO and FUA bits are both set to one, write and read operations bypass the cache memory. For the VERIFY command, an FUA is implied, since the blocks of data stored on the medium are being verified. Further, a SYNCHRONIZE CACHE operation (see below) is also implied to flush an unwritten blocks of data still in the cache memory. These blocks of data must be stored on the medium before the verify operation can begin. The DPO bit is still provided since the VERIFY command may still cause the replacement of blocks in the cache. The above also applies to the WRITE AND VERIFY command. Certain special commands may be implemented by the direct-access device that allow the initiator to control other behavior of the cache memory: - LOCK UNLOCK CACHE controls whether certain logical blocks will be held in the data cache for future use. Locking a logical block prevents its replacement by a future access. Unlocking a logical block exposes it to possible replacement by a future access. (See 8.2.2) - PRE-FETCH causes a set of logical blocks requested by the initiator to be read into the data cache for possible future access. The blocks fetched are subject to later replacement unless they are locked (see 8.2.3) - SYNCHRONIZE CACHE forces any pending write data in the requested set of logical blocks to be stored in the physical medium. This command can be used to ensure that the data was written and any errors reported. (see 8.2.18) - The MODE SELECT command defines a page for the control of cache behavior and handles certain basic elements of cache replacement algorithms (see 8.3.3.1). 8.1.7. Reservation The access enabled or access disabled condition determines when an initiator may store or retrieve user data all or part of the medium. Access may be restricted for read operations, write operations, or both. This attribute may be controlled by an external mechanism or by the RESERVE and RELEASE commands (see 8.2.12 and 8.2.11). The RESERVE and RELEASE commands define how different types of restricted access may be achieved, and to whom the access is restricted. This section describes the interaction of the initiator that requested the reservation, and the other initiators. An initiator uses reservations to gain a level of exclusivity in access to all or part of the medium for itself or another initiator. It is expected that the reservation will be retained until released. The direct-access device must ensure that the initiator with the reservation is able to access the reserved media within the operating parameters established by that initiator. The following list explains the targets actions in a situation where a reservation exists for various commands. Unless otherwise noted, an initiator that issues any command to a direct-access device that has a logical unit reservation to another initiator, incurs a reservation conflict. The CHANGE DEFINITION command is dealt with as follows. If any initiator has an extent reservation on a direct-access device, no other initiator may affect the operating definition of that initiator by use of this command. If the direct-access device allows different operating definitions for each initiator, then there is no conflict; otherwise, a reservation conflict occurs. The COMPARE, COPY, and COPY AND VERIFY commands are evaluated for reservation conflict as if they were normal write and read operations even when a direct-access device is requested to copy to or from itself, those write and read accesses. For example, if a COPY is issued to logical unit 0 that requests the direct-access device to copy from logical unit 0 to logical unit 1, access to logical unit 1 must also be evaluated for conflict. The FORMAT UNIT, PREVENT ALLOW MEDIUM REMOVAL, REZERO UNIT, and START STOP UNIT commands will generate a reservation conflict if any other initiator has an extent reservation on a direct-access device. The INQUIRY and REQUEST SENSE commands are not affected by any kind of reservation. The LOG SELECT, LOG SENSE, MODE SENSE, TEST UNIT READY, READ CAPACITY (PMI set to zero), READ BUFFER, WRITE BUFFER, and READ DEFECT DATA commands are not affected by extent reservations. The SEEK, LOCK UNLOCK CACHE, PRE-FETCH, and SYNCHRONIZE CACHE commands are evaluated for reservation conflict as if they were normal write or read operations. The MODE SELECT command is dealt with as follows. If an initiator has an extent reservation on a direct-access device, and another initiator attempts one of these command, a reservation conflict occurs if the command affects the manner in which access of the extent by the first initiator is performed. If the command does not affect access to the extent, or parameters are saved for each initiator, then a conflict does not occur. The SEND DIAGNOSTIC, RECEIVE DIAGNOSTIC RESULTS commands conflict with an extent reservation only if they affect access to the extent (as with MODE SELECT). The REASSIGN BLOCKS command may not reassign a block that is in an extent reserved to another initiator. The SET LIMITS command generates a reservation conflict if the logical blocks specified are within an extent reserved to another initiator. ALL other commands are that request read or write operations are evaluated for reservation conflict as described in the RESERVE command. When a system is integrated with more than one initiator, there must be agreement between the initiators as to how media is reserved and released during operations, otherwise an initiator may be locked out of access to a target in the middle of an operation. For example, initiator 'A' is performing writes to a direct-access device that are being cached. Then, initiator 'B' issues a RESERVE command to the direct-access device. As a result, initiator 'A' is locked out of issuing a SYNCHRONIZE CACHE command to ensure the integrity of the writes. To prevent this from happening, initiator 'A' should issue a RESERVE prior to the cached write commands. 8.1.8. Seek and Rezero The SEEK command provides a way for the initiator to position the device in preparation for access to a particular logical block at some later time. Since this positioning action is implicit in other commands, the SEEK command may not be useful with some direct-access devices. The REZERO UNIT command is provided to bring the direct-access device to a known condition. This standard does not specify the condition. The REZERO UNIT command is used in some devices to position the actuator at cylinder zero. Some devices return GOOD status without attempting any action. 8.1.9. Notched Drives A notched (also called partitioned or zoned) drive has areas of the medium in which the drive geometry changes. In the simplest case, the entire medium consists of a single notch. Multiple notches are often used to increase capacity of the drive. The notch page is used to indicate the notch for assignment of values to the parameters in the format device page. By sequencing the notch page through each notch, the format device parameters of each notch are set. This is usually done prior to initialization by the FORMAT UNIT command. 8.1.10. Rotational Position Locking Rotational position locking is an optional feature implemented in some direct-access devices to allow the synchronization of spindles between a number of devices. The rotational position offset feature allows devices to synchronize spindles at offsets from index. This may be useful in improving performance in systems that implement arrays of devices. 8.1.11. Relative Addressing Relative addressing is a technique useful in accessing structured data in a uniform manner. Relative addressing is only allowed when commands are linked. Section 6.4.3 gives an example of relative addressing and linking for SEARCH DATA commands appropriate to direct-access devices. The SET LIMITS command is provided to define the limits of a linked chain of relative addressing commands. This gives an additional protection against exceeding a particular set of blocks. The SET LIMITS command has no effect on any other initiator. 8.1.12. Error Reporting If any of the following conditions occur during the execution of a command the target shall return CHECK CONDITION status. The appropriate sense key and additional sense code should be set. The following table illustrates some error conditions and the applicable sense keys. The table does not provide an exhaustive enumeration of all conditions that may cause the CHECK CONDITION status. Condition Sense Key ---------------------------------------------- ---------------------------- Invalid logical block address ILLEGAL REQUEST Unsupported option requested ILLEGAL REQUEST Target reset or medium change since last command from this initiator UNIT ATTENTION Self diagnostic failed HARDWARE ERROR Unrecovered read error MEDIUM ERROR HARDWARE ERROR Recovered read error RECOVERED ERROR Overrun or other error that might be resolved by repeating the command ABORTED COMMAND Attempt to write on write protected medium DATA PROTECT In the case of an invalid logical block address, the sense data information field shall be set to the logical block address of the first invalid address. In the case of an attempt to read a blank or previously unwritten block, the information field shall be set to the logical block address of the first blank block encountered. The data read up to that block shall be transferred (optical memory and write-once devices only). In the case of an attempt to write a previously written block and blank checking is enabled, the information field shall be set to the logical block address of the first non-blank block encountered (optical memory and write- once devices only). 8.1.13. Examples The following examples show some typical variations of the direct-access device. Other variations are possible. 8.1.13.1. Rotating Media The typical application of a direct-access device is a disk drive. The medium is a disk coated with a material in which flux changes may be induced. The disk drive allows direct and random access to the medium. This is done using a actuator which positions the read-write head, and a rotating disk. Data is stored and retrieved through the interaction of the read-write head and the disk. The disk is typically divided into cylinders. Each cylinder is typically divided into tracks. Each track is typically divided into sectors. A cylinder is a set of tracks than can be accessed without movement of the actuator. A track is a recording path over which the read-write head travels during one rotation of the disk. A sector is a part of a track that contains the stored data blocks. A logical block is stored in one or more sectors, or a sector may store more than one logical block. A sector is typically made up of a header, data and a trailer. The header contains a preamble used to synchronize read circuits to the data, an address field to identify the sector, flags to use for defect management, and a checksum that validates the header. The data contains the block of data. The trailer contains the checksum and the error correction information if it is used. The checksum or the error correction information allows the correction data for medium defects. A disk drive is typically ready when the disks are rotating at the correct speed and the read-write circuitry is powered and ready to access the disks. Some disks, particularly removable disks, require the user to issue load or start commands to bring the disk drive to the ready state. A disk drive will typically have to be formatted prior to the initial access. Exceptions to this are drives that are formatted at the factory and some optical drives with pre-formatted media (see 12.1). A disk drive format will typically create the headers for each sector and initialize the data field. The MODE SELECT command is often used at format time to establish the geometry (number of heads and tracks, sectors per track, etc.) and defect management scheme. Disk drives are usually non-volatile. The defect management scheme of a disk drive is often shielded from the user, though some aspects can be evaluated and controlled by the initiator. The direct-access device will usually reserve some sectors and tracks for recording defect tables and for reassigning defective blocks. The READ LONG and WRITE LONG commands will typically access the user data and checksum portions of the data field so that defects may be induced by the initiator to test the defect detection logic of the direct-access device. Notches find their most typical use in a rotating disk drive. On a disk, the inner tracks are physically shorter than the outer tracks. As a result, if each track is made to store the same number of data bits, the data is packed more densely on the inner tracks than the outer tracks. By using notches, the outer tracks may be made to contain a different number of sectors than the inner tracks, balancing the data density. This results in increased capacity. 8.1.13.2. Sequential Media Some tape devices are implemented as a direct access device so that they can be used in disk oriented operating system environments. These devices are sometimes referred to as 'random access tape' or 'floppy tape'. These devices might be thought of as a disk drive with one or a few very long tracks. Access time to a logical block is usually longer than for a disk drive, since the tape must be fast forwarded or rewound to the block. As a result, the SEEK command will often be more useful for a tape than for a disk. The only way an initiator may determine if a direct-access device is a tape is to use the medium type code returned by the MODE SENSE command. 8.1.13.3. Memory Media Memory media includes devices which are traditionally used for primary storage within computer systems, such as solid state static or dynamic random access memories (SRAM or DRAM), or magnetic core or bubble memory. These devices are typically non-mechanical and therefore the entire physical medium may be accessed in virtually the same access time. The data is typically accessed as a bit or byte and this also speeds access time. Memory devices typically store less data than disks or tapes, and are usually volatile when not protected by battery backup. 8.2. Commands for Direct-Access Devices. The commands for direct-access devices shall be as shown in Table 8-1. Table 8-1: Commands for Direct-Access Devices ============================================================================== Operation Command Name Code Type Section ------------------------------------------------------------------------------ CHANGE DEFINITION 40h O 7.2.1 COMPARE 39h O 7.2.2 COPY 18h O 7.2.3 COPY AND VERIFY 3Ah O 7.2.4 FORMAT UNIT 04h M 8.2.1 INQUIRY 12h M 7.2.5 LOCK-UNLOCK CACHE 36h O 8.2.2 LOG SELECT 4Ch O 7.2.6 LOG SENSE 4Dh O 7.2.7 MODE SELECT(6) 15h O 7.2.8 MODE SELECT(10) 55h O 7.2.9 MODE SENSE(6) 1Ah O 7.2.10 MODE SENSE(10) 5Ah O 7.2.11 PRE-FETCH 34h O 8.2.3 PREVENT-ALLOW MEDIUM REMOVAL 1Eh O 8.2.4 READ(6) 08h M 8.2.5 READ(10) 28h M 8.2.6 READ BUFFER 3Ch O 7.2.12 READ CAPACITY 25h M 8.2.7 READ DEFECT DATA 37h O 8.2.8 READ LONG 3Eh O 8.2.9 REASSIGN BLOCKS 07h O 8.2.10 RECEIVE DIAGNOSTIC RESULTS 1Ch O 7.2.13 RELEASE 17h M 8.2.11 REQUEST SENSE 03h M 7.2.14 RESERVE 16h M 8.2.12 REZERO UNIT 01h O 8.2.13 SEARCH DATA EQUAL 31h O 8.2.14.1 SEARCH DATA HIGH 30h O 8.2.14.2 SEARCH DATA LOW 32h O 8.2.14.3 SEEK(6) 0Bh O 8.2.15 SEEK(10) 2Bh O 8.2.15 SEND DIAGNOSTIC 1Dh M 7.2.15 SET LIMITS 33h O 8.2.16 START STOP UNIT 1Bh O 8.2.17 SYNCHRONIZE CACHE 35h O 8.2.18 TEST UNIT READY 00h M 7.2.16 VERIFY 2Fh O 8.2.19 ============================================================================== Table 8-1 continued ============================================================================== Operation Command Name Code Type Section ------------------------------------------------------------------------------ WRITE(6) 0Ah M 8.2.20 WRITE(10) 2Ah M 8.2.21 WRITE AND VERIFY 2Eh O 8.2.22 WRITE BUFFER 3Bh O 7.2.17 WRITE LONG 3Fh O 8.2.23 WRITE SAME 41h O 8.2.24 ============================================================================== Key: M = Command implementation is mandatory. O = Command implementation is optional. The following operation codes are vendor-specific: 02h, 05h, 06h, 09h, 0Ch, 0Dh, 0Eh, 0Fh, 10h, 11h, 13h, 14h, 19h, 20h, 21h, 22h, 23h, 24h, 26h, 27h, 29h, 2Ch, 2Dh and C0h through FFh. All remaining operation codes for direct- access devices are reserved for future standardization. 8.2.1. FORMAT UNIT Command Table 8-2: FORMAT UNIT Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (04h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | FmtData| CmpLst | Defect List Format | -----|-----------------------------------------------------------------------| 2 | Vendor-Specific | -----|-----------------------------------------------------------------------| 3 | (MSB) | -----|--- Interleave ---| 4 | (LSB) | -----|-----------------------------------------------------------------------| 5 | Control | ============================================================================== The FORMAT UNIT command (Table 8-2) formats the medium into initiator addressable logical blocks per the initiator defined options. In addition, the medium may be certified and control structures may be created for the management of the medium and defects. There is no guarantee that the medium has or has not been altered. The simplest mandatory form of the FORMAT UNIT command (with no format data) accomplishes medium formatting with little initiator control over defect management. The target implementation determines the degree of defect management that is to be performed. Two additional mandatory forms of this command increase the initiator's control over defect management. Several optional forms of this command further increase the initiator's control over defect management, by allowing the initiator to specify which defect list(s) are to be used, to specify defect locations (in several formats), to enable target certification, and to specify what to do in the event that defect lists are not accessible. The FORMAT UNIT command shall be rejected with RESERVATION CONFLICT status if the logical unit is reserved, or any extent reservation, from any initiator, is active in the specified logical unit. During the format operation, the target shall respond to commands as follows: (1) In response to all commands except REQUEST SENSE and INQUIRY, the target shall return CHECK CONDITION status unless a reservation conflict exists in which case RESERVATION CONFLICT status shall be returned. (2) In response to the INQUIRY command, the target shall respond as commanded. (3) In response to the REQUEST SENSE command, unless an error has occurred, the target shall return a sense key of NOT READY and an additional sense code of LOGICAL UNIT NOT READY FORMAT IN PROGRESS, with the sense key specific bytes set for progress indication (as described in 7.2.14.1). Refer to 7.2.14.2 for a description of deferred error handling which may occur during the format operation. IMPLEMENTORS NOTE: It is recommended that MODE SELECT parameters (if any) be set prior to issuing the FORMAT UNIT command. During the execution of the FORMAT UNIT command, the target may perform a medium defect management algorithm (which can be controlled by the initiator, using optional forms of this command). Four sources of defect location information (hereafter called defects) are defined as follows: Primary defect list (Plist). This is the list of defects, usually supplied by the original manufacturer of the device or medium, that are considered as permanent defects. The Plist is located outside of the initiator-accessible logical block space. The Plist is accessible by the target (to reference while formatting), but it is not normally accessible by the initiator except through the READ DEFECT DATA command. Once created, the original Plist shall not be subject to change. Target certification list (Clist). This list includes defects detected by the target during an optional certification process executed during the FORMAT UNIT command. This list shall be added to the Glist. Data defect list (Dlist). This list of defect descriptors may be supplied to the target by the initiator in the DATA OUT phase of the FORMAT UNIT command. This list shall be added to the Glist. The defect list length in the defect list header may be zero, in which case there is no Dlist. Grown defect list (Glist). The Glist includes all defects sent by the initiator or detected by the target. The Glist does not include the Plist. If the CmpLst bit is zero the Glist shall include Dlists provided to the target during the previous and the current FORMAT UNIT commands. The Glist shall also include: (1) Defects detected by the format operation during medium certification. (2) Defects previously identified with a REASSIGN BLOCKS command. (3) Defects previously detected by the target and automatically reallocated. A format data (FmtData) bit of one indicates that the FORMAT UNIT parameter list (see Table 8-3) shall be transferred during the DATA OUT phase. The DATA OUT phase consists of a defect list header (see Table 8-4), followed by an initialization pattern descriptor, followed by zero or more defect descriptors. Each defect descriptor identifies a location on the medium that the target shall map out of the user-accessible area. A FmtData bit of zero indicates that a DATA OUT phase shall not occur. The source of defect information is not specified. A complete list (CmpLst) bit of one indicates that the defect list sent by the initiator is a complete list of defects. Any existing defect list except the Plist shall be ignored by the target. As a result a new Glist is constructed which contains the Dlist (if it is sent by the initiator), and the Clist (if certification is enabled). The target may add any defects it detects during the format operation to this Dlist. A CmpLst bit of zero indicates that the defect list sent by the initiator is an addition to existing list of defects. As a result a new Glist is constructed which contains the existing Glist, the Dlist (if it is sent by the initiator) and the Clist (if certification is enabled). The target may add any defects it detects during the format operation to this Dlist. The defect list format field specifies which defect descriptor is used if the FmtData bit is one (see Table 8-5). The interleave field specifies the interleave that is used when performing the format operation. This allows the logical blocks to be related in a way that facilitates matching the transfer rate between the initiator and the peripheral. An interleave of zero specifies that the target use its default interleave. An interleave of one specifies that consecutive logical blocks be placed in contiguous ascending order. All other values are vendor specific. Table 8-3: FORMAT UNIT Parameter List ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== | Defect List Header | ============================================================================== | Initialization Pattern Descriptor (if any) | ============================================================================== | Defect Descriptor(s) (if any) | ============================================================================== | Defect Descriptor 0 | | (See specific table for length.) | -----|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| | Defect Descriptor n | | (See specific table for length.) | ============================================================================== Table 8-4: Defect List Header ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | FOV | DPRY | DCRT | STPF | IP | DSP | Immed | VS | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- Defect List Length ---| 3 | (LSB) | ============================================================================== The defect list header (TABLE 8-4) provides several optional format control bits. Targets that implement these bits give the initiator additional control over the use of the four defect sources, and the formatting operation. If the initiator attempts to select any function not implemented by the target, the target shall terminate the command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST and the additional sense code shall be set to INVALID FIELD IN PARAMETER LIST. A format options valid (FOV) bit of zero indicates that the target shall use its default settings for the DPRY, DCRT, STPF, IP and DSP bits (see below). The initiator shall set these bits to zero. If any of these bits are not zero, the target shall terminate the command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST and the additional sense code shall be set to INVALID FIELD IN PARAMETER LIST. A FOV bit of one indicates that the target shall examine the setting of the DPRY, DCRT, STPF, IP and DSP bits. When FOV is one the DPRY, DCRT, STPF, IP and DSP bits are defined below. A disable primary (DPRY) bit of zero indicates that the target shall not use portions of the medium identified as defective in the primary defect Plist for initiator addressable logical blocks. If the target cannot locate the Plist or it cannot determine whether a Plist exists, it shall perform the action specified by the STPF bit. A DPRY bit of one indicates that the target shall not use the Plist to identify defective areas of the medium. The Plist is not deleted. A disable certification (DCRT) bit of zero indicates that the target shall perform a vendor-specific medium certification operation to generate a Clist. A DCRT bit of one indicates that the target shall not perform any vendor- specific medium certification process or format verification operation while executing the FORMAT UNIT command. The stop format (STPF) bit controls the behavior of the target when one of the following events occurs: (1) The target has been requested to use the primary defect list (DPRY is set to zero), or the grown defect list (CmpLst is set to zero) and the target cannot locate the list nor determine whether the list exists. (2) The target has been requested to use the primary defect list (DPRY is set to zero) or the grown defect list (CmpLst is set to zero), and the target encounters an error while accessing the defect list. A STPF bit of zero indicates that, if one or both of the above conditions occurs, the target shall continue to execute the FORMAT UNIT command. The target shall return CHECK CONDITION status at the completion of the FORMAT UNIT command. The sense key shall be set to RECOVERED ERROR and the additional sense code shall be set to to either DEFECT LIST NOT FOUND if condition one occurred, or DEFECT LIST ERROR if condition two occurred. A STPF bit of one indicates that, if one or both of the above conditions occurs, the target shall terminate the FORMAT UNIT command with CHECK CONDITION status. The sense key shall be set to MEDIUM ERROR and the additional sense code shall be set to to either DEFECT LIST NOT FOUND if condition one occurred, or DEFECT LIST ERROR if condition two occurred. IMPLEMENTORS NOTE: The use of the FmtData bit, the CmpLst bit, and the defect header allow the initiator to control the source of the defect lists used by the FORMAT UNIT command. Setting the defect list length to zero allows the initiator to control the use of Plist and Clist without having to specify a Dlist. Table 8-5 defines the implementation requirements for the FORMAT UNIT command. Table 8-5: FORMAT UNIT Defect Descriptor Format and Requirements ============================================================================== FmtData | CmpLst | | Defect Defect | | List List Command | | Format Length Type Comments - - ------ ------ --------- ------------------------------------------ 0 0 000b N/A Mandatory Target-defined use of defect sources. ------------------------------------------------------------------------------ BLOCK FORMAT: 1 0 000b Zero Mandatory (1),(3) 1 1 000b Zero Mandatory (1),(4) 1 0 000b >0 Optional (2),(3) 1 1 000b >0 Optional (2),(4) ------------------------------------------------------------------------------ BYTES FROM INDEX FORMAT: 1 0 100b Zero Optional (1),(3) 1 1 100b Zero Optional (1),(4) 1 0 100b >0 Optional (2),(3) 1 1 100b >0 Optional (2),(4) ------------------------------------------------------------------------------ PHYSICAL SECTOR FORMAT: 1 0 101b Zero Optional (1),(3) 1 1 101b Zero Optional (1),(4) 1 0 101b >0 Optional (2),(3) 1 1 101b >0 Optional (2),(4) ------------------------------------------------------------------------------ 1 0 110b Vendor-Specific 1 1 110b Vendor-Specific All other codes Reserved NOTE: All options described above cause a new Glist to be created during the execution of the FORMAT UNIT command as described in the text above. =============================================================================== NOTES: (1) No Dlist is transferred to the target during the DATA OUT phase. (2) A Dlist is transferred to the target during the DATA OUT phase. Add the Dlist defects to the new Glist. (3) Use the existing Glist as a defect source. Add existing Glist defects to the new Glist. (4) Discard the existing Glist. Do not add existing Glist defects to the new Glist. A disable saving parameters (DSP) bit of one, specifies that the target shall not save the MODE SELECT savable parameters to non-volatile memory during the format operation. A DSP bit of zero specifies that the target shall save all the MODE SELECT savable parameters for all initiators to non- volatile memory during the format operation. An immediate (Immed) bit of zero indicates that status shall be returned after the format operation has completed. An Immed bit value of one indicates that the target shall return status as soon as the command descriptor block has been validated, and the entire defect list has been transferred. The defect list length field in the defect list header specifies the total length in bytes of the defect descriptors that follow and does not include the initialization pattern descriptor or initialization pattern, if any. The length of the defect descriptors varies with the format of the defect list. The three formats for the defect descriptor(s) field in the defect lists are shown in Tables 8-6, 8-7, and 8-8. In Table 8-6, the defect list length is equal to four times the number of defect descriptors. In Tables 8-7 and 8-8, the defect list length is equal to eight times the number of defect descriptors. 8.2.1.1. Defect List Formats This section describes the defect list formats used in the FORMAT UNIT, READ DEFECT DATA and translate page of the SEND DIAGNOSTIC and RECEIVE DIAGNOSTIC RESULTS commands. IMPLEMENTORS NOTE: The selected reporting format must account for variables which can impact the information in the returned. For example, the specific location of a defect, while constant in angular and radial location on the device, may change in reported location a format operation with different geometry parameters is performed. It is the responsibility of the initiator to use a defect list format appropriate for the intended operation with the current or future geometry parameters. If the target is able to detect that the selected defect list format would provide inconsistent results, the target may return CHECK CONDITION status. Table 8-6: Defect Descriptor - Block Format ============================================================================== Byte | Defect Descriptor | ============================================================================== 0 | (MSB) | - - -|- - Defective Block Address - -| 3 | (LSB) | ============================================================================== Each block format defect descriptor specifies a four-byte defective block address that contains the defect. The defect descriptors should be in ascending order. More than one physical or logical block may be affected by each defect descriptor. A target may return CHECK CONDITION if the defect descriptors are not in ascending order. Table 8-7: Defect Descriptor - Bytes From Index Format ============================================================================== Byte | Defect Descriptor | ============================================================================== 0 | (MSB) | - - -|- - Cylinder Number of Defect - -| 2 | (LSB) | -----|-----------------------------------------------------------------------| 3 | Head Number of Defect | -----|-----------------------------------------------------------------------| 4 | (MSB) | - - -|- - Defect Bytes from Index - -| 7 | (LSB) | ============================================================================== Each bytes from index defect descriptor specifies the location of a defect which is no more than eight-bytes in length. Each descriptor is comprised of the cylinder number of defect, the head number of defect, and the defect bytes from index to the defect. The defect descriptors shall be in ascending order. The cylinder number of defect is the most significant part of the address and the defect bytes from index is the least significant part of the address. More than one physical or logical block may be affected by each defect. A defect bytes from index of FFFFFFFFh indicates that the entire track shall be considered defective. Table 8-8: Defect Descriptor - Physical Sector Format ============================================================================== Byte | Defect Descriptor | ============================================================================== 0 | (MSB) | - - -|- - Cylinder Number of Defect - -| 2 | (LSB) | -----|-----------------------------------------------------------------------| 3 | Head Number of Defect | -----|-----------------------------------------------------------------------| 4 | (MSB) | - - -|- - Defective Sector Number - -| 7 | (LSB) | ============================================================================== Each physical sector defect descriptor specifies the location of a defect that is the length of a sector. Each descriptor is comprised of a cylinder number of defect, the head number of defect, and the defective sector number. The defect descriptors shall be in ascending order. The cylinder number of defect is the most significant part of the address and the defective sector number is the least significant part of the address. More than one block may be affected by each defect descriptor. A defective sector number of FFFFFFFFh indicates that the entire track shall be considered defective. 8.2.1.2. Initialization Pattern Option The initialization pattern option specifies that the logical blocks contain the specified initialization pattern. The initialization pattern descriptor (Table 8-9) is sent to the target as part of the FORMAT UNIT parameter list. Table 8-9: Initialization Pattern Descriptor ============================================================================== 0 | IP Modifier | Reserved | -----|-----------------------------------------------------------------------| 1 | Pattern Type | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- Initialization Pattern Length ---| 3 | (LSB) | -----|-----------------------------------------------------------------------| 0 - | Initialization Pattern | n | | ============================================================================== IMPLEMENTORS NOTE: The initialization pattern option is not intended for media analysis or certification. This option may only initialize the initiator accessible area of the media to the specified pattern and may not write to any initiator inaccessible areas of the disk. An initialization pattern (IP) bit of one indicates that an initialization pattern descriptor is included in the FORMAT UNIT parameter list immediately following the defect list header. An IP bit of zero indicates that an initialization pattern descriptor is not included and that the target shall use its default initialization pattern. The IP modifier field specifies the type and location of a header that modifies the initialization pattern (Table 8-10). Table 8-10: Initialization Pattern Modifier ============================================================================== IP Modifier Description ------------------------------------------------------------------------------ 0 0 No header. The target shall not modify the the initialization pattern. 0 1 The target shall overwrite the initialization pattern to write the logical block address in the first four bytes of the logical block. The logical block address shall be written with the most significant byte first. 1 0 The target shall overwrite the initialization pattern to write the logical block address in the first four bytes of each physical block contained within the logical block. The lowest numbered logical block or part thereof that occurs within the physical block is used. The logical block address shall be written with the most significant byte first. 1 1 Reserved. ============================================================================== The initialization pattern type field indicates the type of pattern the target shall use to initialize each logical block within the initiator accessible portion of the medium (Table 8-11). All bytes within a logical block shall be written with the initialization pattern. The initialization pattern is modified by the IP modifier field as described above in Table 8-10. Table 8-11: Initialization Pattern Type ============================================================================== Pattern Type Note Description ------------------------------------------------------------------------------ 00h (1) Use default pattern 01h (2) Repeat the initialization pattern as required to fill the logical block 02-7Fh none Reserved 80-FFh none Vendor-specific ============================================================================== NOTES: (1) If the initialization pattern length is not zero the target shall terminate the command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST and the additional sense code shall be set to INVALID FIELD IN PARAMETER LIST. (2) If the initialization pattern length is zero the target shall terminate the command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST and the additional sense code shall be set to INVALID FIELD IN PARAMETER LIST. The initialization pattern length field indicates the number of bytes contained in the initialization pattern. If the length exceeds the current logical block size the target shall terminate the command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST and the additional sense code shall be set to INVALID FIELD IN PARAMETER LIST. The pattern is modified by the IP modifier field. 8.2.2. LOCK UNLOCK CACHE Command Table 8-12: LOCK UNLOCK CACHE Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (36h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | Lock | RelAdr | -----|-----------------------------------------------------------------------| 2 | (MSB) | - - -|- - Logical Block Address - -| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Number of Blocks ---| 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The LOCK UNLOCK CACHE command (Table 8-12) requests that the target disallow or allow logical blocks within the specified range to be removed from the cache memory by the target's cache replacement algorithm. Locked logical blocks may be written to the medium when modified, but a copy of the modified logical block shall remain in the cache memory. A lock bit of one indicates that any logical block in the specified range that is currently present in the cache memory shall be locked into cache memory. Only logical blocks that are already present in the cache memory are actually locked. A lock bit of zero indicates that all logical blocks in the specified range that are currently locked into the cache memory shall be unlocked, but not necessarily removed. A relative address (RelAdr) bit of one indicates that the logical block address field is a two's complement displacement. This negative or positive displacement is to be added to the logical block address last accessed on the logical unit to form the logical block address for this command. This feature is only available when linking commands. The feature requires that a previous command in the linked group have accessed a block of data on the logical unit. A RelAdr bit of zero indicates that the logical block address field specifies the first logical block of the range of logical blocks to be operated on by this command. The number of blocks specifies the total number of contiguous logical blocks within the range. A number of blocks field of zero indicates that all remaining logical blocks on the logical unit shall be within the range. Multiple locks may be in effect from more than one initiator. Locks from different initiators may overlap. An unlock of an overlapped area does not release the lock of another initiator. 8.2.3. PRE-FETCH Command Table 8-13: PRE-FETCH Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (34h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | Immed | RelAdr | -----|-----------------------------------------------------------------------| 2 | (MSB) | - - -|- - Logical Block Address - -| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Transfer Length | 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The PRE-FETCH command (Table 8-13) requests the target to transfer the specified logical blocks to the cache memory. No data shall be transferred to the initiator. An immediate (Immed) bit of one indicates that status shall be returned as soon as the command descriptor block has been validated. An Immed bit of zero indicates that status shall be returned after the operation is complete. See 8.2.2 for a definition of the RelAdr bit and the logical block address field. The transfer length field specifies the number of contiguous logical blocks of data that shall be transferred to the target's cache memory. A transfer length of zero indicates that the contiguous logical blocks up to and including the last logical block of the logical unit shall be transferred to the target's cache memory. Any other value indicates the number of logical blocks that shall be transferred. The target may elect to not transfer logical blocks that already are contained in the cache memory. If the Immed bit is zero and the specified logical blocks were successfully transferred to the cache memory the target shall return CONDITION MET status. If the link bit (see 6.2.7) is one the target shall return INTERMEDIATE- CONDITION MET status. If Immed is one and the unlocked cache memory has sufficient capacity to accept all of the specified logical blocks the target shall return CONDITION MET status. If the link bit (see 6.2.7) is one the target shall return INTERMEDIATE-CONDITION MET status. If Immed is one and the unlocked cache memory does not have sufficient capacity to accept all of the specified logical blocks the target shall return GOOD status. The target shall transfer to cache memory as many logical blocks as will fit. If the link bit (see 6.2.7) is one the target shall return INTERMEDIATE status. 8.2.4. PREVENT ALLOW MEDIUM REMOVAL Command Table 8-14: PREVENT ALLOW MEDIUM REMOVAL Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (1Eh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | Prevent| -----|-----------------------------------------------------------------------| 5 | Control | ============================================================================== The PREVENT ALLOW MEDIUM REMOVAL command (Table 8-14) requests that the target enable or disable the removal of the medium in the logical unit. This mechanism is independent of device reservations and the target shall not allow medium removal if any initiator currently has medium removal prevented. The prevention of medium removal shall begin when any initiator issues a PREVENT ALLOW MEDIUM REMOVAL command with a prevent bit of one (medium removal prevented). The prevention of medium removal for the logical unit shall terminate: (1) after all initiators that have medium removal prevented issue PREVENT ALLOW MEDIUM REMOVAL commands with a prevent bit of zero, and the target has successfully performed a synchronize cache operation. (2) upon the receipt of a BUS DEVICE RESET message from any initiator, or (3) upon a hard RESET condition. While a prevention of medium removal condition is in effect the target shall inhibit mechanisms that normally allow removal of the medium by an operator. 8.2.5. READ(6) Command Table 8-15: READ(6) Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (08h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | (MSB) | -----|------------------------------ ---| 2 | Logical Block Address | -----|--- ---| 3 | (LSB) | -----|-----------------------------------------------------------------------| 4 | Transfer Length | -----|-----------------------------------------------------------------------| 5 | Control | ============================================================================== The READ(6) command (Table 8-15) requests that the target transfer data to the initiator. The most recent data value written in the addressed logical block shall be returned. The cache control bits (see 8.2.6) are not provided for this command. Targets with cache memory may have values for the cache control bits which may affect the READ(6) command, however no default value is defined by this standard. If explicit control is required, the READ(10) command should be used. The logical block address field specifies the logical block at which the read operation shall begin. The transfer length field specifies the number of contiguous logical blocks of data to transferred. A transfer length of zero indicates that 256 logical blocks shall be transferred. Any other value indicates the number of logical blocks that shall be transferred. 8.2.6. READ(10) Command Table 8-16: READ(10) Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (28h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | DPO | FUA | Reserved | RelAdr | -----|-----------------------------------------------------------------------| 2 | (MSB) | - - -|- - Logical Block Address - -| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Transfer Length | 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The READ(10) command (Table 8-16) requests that the target transfer data to the initiator. The most recent data value written in the addressed logical block shall be returned. A disable page out (DPO) bit of one indicates that the target shall assign the logical blocks accessed by this command the lowest priority for being fetched into or retained by the cache. A DPO bit of one overrides any retention priority specified in the cache page (see 8.3.3.1). A DPO bit of zero indicates the priority shall be determined by the retention priority fields in the cache page. All other aspects of the algorithm implementing the cache memory replacement strategy are not defined by this standard. IMPLEMENTORS NOTE: The DPO bit is used to control replacement of logical blocks in the cache memory when the host has information on the future usage of the logical blocks. If the the DPO bit is set to one, the host knows the logical blocks accessed by the command are not likely to be accessed again in the near future and should not be put in the cache memory nor retained by the cache memory. If the DPO bit is zero, the host expects that logical blocks accessed by this command are likely to be accessed again in the near future. A force unit access (FUA) bit of one indicates that the target shall access the media in performing the command prior to returning GOOD status. Read commands shall access the specified logical blocks from the media (i.e., the data is not directly retrieved from the cache). In the case where the cache contains a more recent version of a logical block than the media, the logical block shall first be written to the media. Write commands shall not return GOOD status until the logical blocks have actually been written on the media (i.e., the data is not write cached). An FUA bit of zero indicates that the target may satisfy the command by accessing the cache memory. For read operations, any logical blocks that are contained in the cache memory may be transferred to the initiator directly from the cache memory. For write operations, logical blocks may be transferred directly to the cache memory. GOOD status may be returned to the initiator prior to writing the logical blocks to the medium. Any errors which occur after the GOOD status is returned is a deferred error and information regarding the error is not reported until a subsequent command. See 8.2.2 for a definition of the RelAdr bit and the logical block address field. The transfer length field specifies the number of contiguous logical blocks of data that shall be transferred. A transfer length of zero indicates that no logical blocks shall be transferred. This condition shall not be considered an error. Any other value indicates the number of logical blocks that shall be transferred. 8.2.7. READ CAPACITY Command Table 8-17: READ CAPACITY Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (25h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | RelAdr | -----|-----------------------------------------------------------------------| 2 | (MSB) | - - -|- - Logical Block Address - -| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | -----|-----------------------------------------------------------------------| 8 | Reserved | PMI | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The READ CAPACITY command (Table 8-17) provides a means for the initiator to request information regarding the capacity of the logical unit. See 8.2.2 for a definition of the RelAdr bit and the logical block address field. The logical block address shall be zero if the PMI bit is zero. If the PMI bit is zero and the logical block address is not zero, the target shall return a CHECK CONDITION status, the sense key shall be set to ILLEGAL REQUEST and the additional sense code set to ILLEGAL FIELD IN CDB. A partial medium indicator (PMI) bit of zero indicates that the returned logical block address and the block length in bytes are that of the last logical block of the logical unit. A PMI bit of one indicates that the returned logical block address and block length in bytes are that of the logical block address after which a substantial delay in data transfer will be encountered. This returned logical block address shall be greater than or equal to the logical block address specified by the RelAdr and logical block address fields in the command descriptor block. IMPLEMENTORS NOTE: This function is intended to assist storage management software in determining whether there is sufficient space on the current track, cylinder, etc. to contain a frequently accessed data structure such as a file directory or file index without incurring an access delay. The READ CAPACITY data (Table 8-18) shall be sent during the DATA IN phase of the command. Table 8-18: READ CAPACITY Data ============================================================================== Byte | Description | ============================================================================== 0 | (MSB) | - - -|- - Returned Logical Block Address - -| 3 | (LSB) | -----|-----------------------------------------------------------------------| 4 | (MSB) | - - -|- - Block Length In Bytes - -| 7 | (LSB) | ============================================================================== 8.2.8. READ DEFECT DATA Command Table 8-19: READ DEFECT DATA Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (37h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | PList | GList | Defect List Format | -----|-----------------------------------------------------------------------| 3 | | - - -|- - Reserved - -| 6 | | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Allocation Length | 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The READ DEFECT DATA command (Table 8-19) requests that the target transfer the medium defect data to the initiator. If the target is unable to access any medium defect data it shall terminate the command with CHECK CONDITION status. The sense key shall be set to either MEDIUM ERROR if a medium error occurred or NO SENSE if the list does not exist and the additional sense code shall be set to DEFECT LIST NOT FOUND. IMPLEMENTORS NOTE: Some targets may not be able to return medium defect data until after a FORMAT UNIT command has been successfully completed. A primary defect list (PList) bit of one requests that the target return the primary list of defects. A PList bit of zero requests that the target not return the primary list of defects. A grown defect list (GList) bit of one requests that the target return the grown defect list. A GList bit of zero requests that the target not return the grown defect list. A PList bit of one and a GList bit of one requests that the target return the primary and the grown defect lists. The order in which the lists are returned is vendor-specific. Whether the lists are merged or not is vendor- specific. A PList bit of zero and a GList bit of zero requests that the target return only the defect list header. The defect list format field is used by the initiator to indicate the preferred format for the defect list. This field is intended for those targets capable of returning more than one format, as defined in the FORMAT UNIT command (see 8.2.1.2, defect list format). A target unable to return the requested format shall return the defect list in its default format (see the defect list format field in the defect list header below). If the requested defect list format and the returned defect list format are not the same the target shall transfer the defect data and then terminate the command with CHECK CONDITION status. The sense key shall be set to RECOVERED ERROR and the additional sense code shall be set to DEFECT LIST NOT FOUND. The READ DEFECT DATA defect list (Table 8-20) contains a four-byte header, followed by zero or more defect descriptors. Table 8-20: READ DEFECT DATA Defect List ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Reserved | PList | GList | Defect List Format | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- Defect List Length | 3 | (LSB) | ============================================================================== Defect Descriptors ============================================================================== 0-n | | ============================================================================== A PList bit of one indicates that the data returned contains the primary defect list. A PList bit of zero indicates that the data returned does not contain the primary defect list. A GList bit of one indicates that the data returned contains the grown defect list. A GList bit of zero indicates that the data returned does not contain the grown defect list. The defect list format field indicates the format of the defect descriptors returned by the target. This field is defined in the FORMAT UNIT command (see 8.2.1.2). IMPLEMENTORS NOTE: The use of the block format is not recommended. There is no universal model that sensibly defines the meaning of the logical block address of a defect. In the usual case a defect that has been reassigned no longer has a logical block address. Defect descriptors returned in the block format are vendor-specific. Defect descriptors returned in the physical sector format may or may not include defects in areas not accessible to the initiator. Defect descriptors returned in bytes-from-index format shall comprise a complete list of defects. A complete list of defects may include defects in areas not within the capacity returned in the READ CAPACITY command. The defect list length field specifies the length in bytes of the defect descriptors that follow. The defect list length is equal to four or eight times the number of defect descriptors depending on the format of the returned descriptors (see Tables 8-8, 8-9 and 8-10 in the FORMAT UNIT command). If the allocation length is insufficient to transfer all of the defect descriptors, the defect list length shall not be adjusted to reflect the truncation. The target shall not create CHECK CONDITION status. The initiator is responsible for comparing the defect list length and the allocation length to ensure that a partial list was not received. IMPLEMENTORS NOTE: The initiator can determine the length of the defect list by sending the READ DEFECT DATA command with an allocation length of four. The target will return the defect list header which contains the length of the defect list. The defect descriptors may or may not be sent in ascending order. The initiator can determine the exact number of defects by dividing the defect list length by the length of a single defect descriptor for the returned format. 8.2.9. READ LONG Command Table 8-21: READ LONG Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (3Eh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | CORRCT | RelAdr | -----|-----------------------------------------------------------------------| 2 | (MSB) | - - -|- - Logical Block Address - -| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Byte Transfer Length | 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The READ LONG command (Table 8-21) requests that the target transfer data to the initiator. The data passed during the READ LONG command is implementation specific, but shall include the data bytes and the ECC bytes recorded on the medium. The most recent data written in the addressed logical block shall be returned. IMPLEMENTORS NOTE: Any other bytes that can be corrected by ECC should be included (e.g., data synchronization mark within the area covered by ECC). It is not important for the ECC bytes to be at the end of the data bytes, however they should be in the same order as they are on the media. A corrected (CORRCT) bit of zero causes a logical block to be read without any correction made by the target. A CORRCT bit of one causes the data to be corrected by ECC before being transferred to the initiator. See 8.2.2 for a definition of the RelAdr bit and the logical block address field. The byte transfer length field should exactly specify the number of bytes of data that are available for transfer. If a non-zero byte transfer length does not exactly match the available data length, the target shall terminate the command with CHECK CONDITION status, the sense key shall be set to ILLEGAL REQUEST and an additional sense code set to INVALID FIELD IN CDB. The valid and ILI bits shall be set to one and the information field shall be set to the difference (residue) of the requested length minus the actual length in bytes. Negative values shall be indicated by two's complement notation. A byte transfer length of zero indicates that no bytes shall be transferred and shall not be considered an error. 8.2.10. REASSIGN BLOCKS Command Table 8-22: REASSIGN BLOCKS Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (07h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Control | ============================================================================== The REASSIGN BLOCKS command (Table 8-22) requests the target to reassign the defective logical blocks to another area on the medium set aside for this purpose. The target should also record the location of the defective logical blocks to the grown defect list if such a list is supported. More than one physical or logical block may be relocated by each defect descriptor sent by the initiator. This command does not alter the contents or location of the Plist (see 8.2.1, FORMAT UNIT command). The initiator transfers a defect list that contains the logical block addresses to be reassigned. The target shall reassign the physical medium used for each logical block address in the list. The data contained in the logical blocks specified in the defect list may be altered, but the data in all other logical blocks on the medium shall be preserved. IMPLEMENTORS NOTE: The effect of specifying a logical block to be reassigned that previously has been reassigned is to reassign the block again. Over the life of the medium, a logical block can be assigned to multiple physical addresses until no more spare locations remain on the medium. The REASSIGN BLOCKS defect list (Table 8-23) contains a four-byte header followed by one or more defect descriptors. The length of each defect descriptor is four bytes. Table 8-23: REASSIGN BLOCKS Defect List ============================================================================== Byte | Defect List Header | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Reserved | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- Defect List Length ---| 3 | (LSB) | ============================================================================== | Defect Descriptor(s) | ============================================================================== 0 | (MSB) | - - -|- - Defect Logical Block Address - -| 3 | (LSB) | ============================================================================== The defect list length field specifies the total length in bytes of the defect descriptors that follow. The defect list length is equal to four times the number of defect descriptors and does not include the defect list header length. The defect descriptor specifies a four-byte defect logical block address that contains the defect. The defect descriptors shall be in ascending order. If the logical unit has insufficient capacity to reassign all of the logical blocks specified in the defect descriptors, the command shall terminate with CHECK CONDITION status, the sense key shall be set to HARDWARE ERROR and the additional sense code set to NO DEFECT SPARE LOCATION AVAILABLE. If the logical unit is unable to successfully complete a REASSIGN BLOCKS command, the command shall terminate with CHECK CONDITION status with the appropriate sense information. The logical block address of the first defect descriptor not reassigned shall be returned in the command-specific information field of the sense data. If information about the first defect descriptor not reassigned is not available, or if all the defects have been reassigned, this field shall be set to FFFFFFFFh. If the REASSIGN BLOCKS command failed due to an unexpected unrecoverable read error that would cause the loss of data in a block not specified in the defect list, the logical block address of the unrecoverable block shall be returned in the information field of the sense data and the valid bit shall be set to one. IMPLEMENTORS NOTE: If the REASSIGN BLOCKS command returns CHECK CONDITION status and the sense data command-specific information field contains a valid logical block address, the initiator should remove all defect descriptors from the defect list prior to the one returned in the command- specific information field. If the sense key is MEDIUM ERROR and the valid bit is one (the information field contains the valid block address) the initiator should insert that new defective logical block address into the defect list and reissue the REASSIGN BLOCKS command with the new defect list. Otherwise, the initiator should perform any corrective action indicated by the sense data and then reissue the REASSIGN BLOCKS command with the new defect list. 8.2.11. RELEASE Command Table 8-24: RELEASE Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (17h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | 3rdPty | Third Party Device ID | Extent | -----|-----------------------------------------------------------------------| 2 | Reservation Identification | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Control | ============================================================================== The RESERVE and RELEASE commands provide the basic mechanism for contention resolution in multiple-initiator systems. The RELEASE command (Table 8-24) is used to release a previously reserved logical unit, or, if the extent release option is implemented, to release previously reserved extents within a logical unit. It is not an error for an initiator to attempt to release a reservation that is not currently valid. In this case, the target shall return GOOD status without altering any other reservation. IMPLEMENTORS NOTE: The reservation queuing option in X3.131-1986 has been removed from SCSI-2. 8.2.11.1. Logical Unit Release (Mandatory) If the extent bit is zero, this command shall cause the target to terminate all non-third-party logical unit and extent reservations that are active from the initiator to the specified logical unit. The reservation ID field in the command descriptor block is ignored by the target. 8.2.11.2. Extent Release (Optional) If the extent bit is one and the extent release option is not implemented, then the RELEASE command shall be terminated with CHECK CONDITION status and the sense key shall be set to ILLEGAL REQUEST. This option shall be implemented if the extent reservation option (see 8.2.12.2) is implemented. If the extent bit is one and the extent release option is implemented, this command shall cause any reservation from the requesting initiator with a matching reservation identification to be terminated. Other reservations from the requesting initiator shall remain in effect. 8.2.11.3. Third-Party Release (Mandatory) Third-party release allows an initiator to release a logical unit or extents within a logical unit that were previously reserved using third-party reservation (see 8.2.12.3). Third-party release shall be implemented and is intended for use in multiple-initiator systems that use the COPY command. If the third-party (3rdPty) bit is zero, then a third-party release is not requested. If the 3rdPty bit is one then the target shall release the specified logical unit or extents, but only if the reservation was made using a third-party reservation by the initiator that is requesting the release for the same SCSI device as specified in the third-party device ID field. If the 3rdPty bit is one the target shall not modify the mode parameters for commands received from the third-party device even if the target implements the transfer of mode parameters with a third-party RESERVE command. IMPLEMENTORS NOTE: If a target implements independent storage of mode parameters for each initiator, a third-party RESERVE command copies the current mode parameters for the initiator that sent the RESERVE command to the current mode parameters for the initiator specified as the third-party device (usually a copy master device). A unit attention condition notifies the third-party of the changed mode parameters due to the the reservation. A successful third-party RELEASE command does not return the third-party devices' current mode parameters back to their previous values. The third- party device can issue MODE SENSE and MODE SELECT commands to query and modify the mode parameters. 8.2.12. RESERVE Command Table 8-25: RESERVE Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (16h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | 3rdPty | Third Party Device ID | Extent | -----|-----------------------------------------------------------------------| 2 | Reservation Identification | -----|-----------------------------------------------------------------------| 3 | (MSB) | -----|--- Extent List Length ---| 4 | (LSB) | -----|-----------------------------------------------------------------------| 5 | Control | ============================================================================== The RESERVE and RELEASE commands provide the basic mechanism for contention resolution in multiple-initiator systems. The RESERVE command (Table 8-25) is used to reserve a logical unit or, if the extent reservation option is implemented, extents within a logical unit. The third-party reservation allows logical units or extents to be reserved for another specified SCSI device. IMPLEMENTORS NOTE: The reservation queuing option in X3.131-1986 has been removed from SCSI-2. 8.2.12.1. Logical Unit Reservation (Mandatory). If the extent bit is zero, this command shall request that the entire logical unit be reserved for the exclusive use of the initiator until the reservation is superseded by another valid RESERVE command from the initiator that made the reservation or until released by a RELEASE command from the same initiator that made the reservation, by a BUS DEVICE RESET message from any initiator, by a hard RESET condition, or by a power on cycle. A logical unit reservation shall not be granted if the logical unit or any extent is reserved by another initiator. It shall be permissible for an initiator to reserve a logical unit that is currently reserved by that initiator. If the extent bit is zero, the reservation identification and the extent list length shall be ignored. If the logical unit, or any extent within the logical unit is reserved for another initiator, the target shall return RESERVATION CONFLICT status. If, after honoring the reservation, any other initiator attempts to perform any command on the reserved logical unit other than an INQUIRY, REQUEST SENSE, ALLOW MEDIUM REMOVAL, RESERVE, or a RELEASE command then the command shall be rejected with RESERVATION CONFLICT status. 8.2.12.2. Extent Reservation (Optional) The reservation identification field provides a means for an initiator to identify each extent reservation. This allows an initiator in a multiple tasking environment, to have multiple reservations outstanding. The reservation identification is used in the RELEASE command to specify which reservation is to be released. It is also used in superseding RESERVE commands to specify which reservation is to be superseded. If the extent reservation option is implemented, then the extent release option (see 8.2.11.2) shall also be implemented. These options permit multiple extents within the logical unit to be reserved, each with a separate reservation type. If the extent bit is one, and the extent reservation option is implemented, then the target shall process the reservation request as follows: (1) The extent list shall be checked for the number of extents in the reservation request. If the extent list length is zero, no current reservations shall be changed, no new reservations shall be created, and this condition shall not be treated as an error. If the extent list contains more extents than are supported on the logical unit, the command shall be terminated with CHECK CONDITION status and the sense key shall be set to ILLEGAL REQUEST. If the extent list contains more extents than are currently available on the logical unit, then the target shall return a RESERVATION CONFLICT status. (2) The extent list shall be checked for valid extent logical block addresses. If any logical block address is invalid for this logical unit, the command shall be terminated with CHECK CONDITION status and the sense key shall be set to ILLEGAL REQUEST. The extent list shall be checked for invalid extent overlaps (as defined by reservation type) with other extent descriptors in the extent list and if invalid overlaps are found, the command shall be terminated with CHECK CONDITION status and the sense key shall be set to ILLEGAL REQUEST. (3) If the requested reservation does not conflict with an existing reservation, the extents specified shall be reserved until superseded by another valid RESERVE command from the initiator that made the reservation or until released by a RELEASE command from the same initiator, by a BUS DEVICE RESET message from any initiator, or by a hard RESET condition. If either of the last two conditions occur, the next command from each initiator shall be terminated with CHECK CONDITION status and the sense key shall be set to UNIT ATTENTION. (4) If the reservation request conflicts with an existing reservation, then the target shall return a RESERVATION CONFLICT status. If the extent bit is one, and the extent reservation option is not implemented, then the RESERVE command shall be rejected with CHECK CONDITION status and the sense key shall be set to ILLEGAL REQUEST. Table 8-26: Data Format of Extent Descriptors ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | RelAdr | Reservation Type| -----|-----------------------------------------------------------------------| 1 | (MSB) | - - -|- - Number of Blocks - -| 3 | (LSB) | -----|-----------------------------------------------------------------------| 4 | (MSB) | - - -|- - Logical Block Address - -| 7 | (LSB) | ============================================================================== The size of the extent list shall be defined by the extent list length field. The extent list shall consist of zero or more descriptors as shown in Table 8-26. Each extent descriptor defines an extent beginning at the specified logical block address for the specified number of blocks. If the number of blocks is zero, the extent shall begin at the specified logical block address and continue through the last logical block address on the logical unit. The reservation type field shall determine the type of reservation to be effected for each extent. Four types of reservations are possible as follows: DB(1) DB(0) Reservation Type ----- ----- ---------------- 1 0 Read Exclusive 0 1 Write Exclusive 1 1 Exclusive Access 0 0 Read Shared Read Exclusive. While this reservation is active, no other initiator shall be permitted read operations to the indicated extent. This reservation shall not inhibit write operations from any initiator or conflict with a write exclusive reservation; however, read exclusive, exclusive access, and read shared reservations that overlap this extent shall conflict with this reservation. Write Exclusive. While this reservation is active, no other initiator shall be permitted write operations to the indicated extent. This reservation shall not inhibit read operations from any initiator or conflict with a read exclusive reservation from any initiator. This reservation shall conflict with write exclusive, exclusive access, and read shared reservations that overlap this extent. Exclusive Access. While this reservation is active, no other initiator shall be permitted any access to the indicated extent. All reservation types that overlap this extent shall conflict with this reservation. Read Shared. While this reservation is active, no write operations shall be permitted by any initiator to the indicated extent. This reservation shall not inhibit read operations from any initiator or conflict with a read shared reservation. Read exclusive, write exclusive, and exclusive access reservations that overlap with this extent shall conflict with this reservation. If the relative address bit is one, the logical block address in the extent descriptor shall be treated as a two's complement displacement. This displacement shall be added to the logical block address last accessed on the logical unit to form the logical block address for this extent. This feature is only available when linking commands and requires that a previous command in the linked group has accessed a logical block on the logical unit; if not, the RESERVE command shall be terminated with CHECK CONDITION status and the sense key shall be set to ILLEGAL REQUEST. If an initiator attempts a command to a logical block that has been reserved and that access is prohibited by the reservation, the command shall not be performed and the command shall be terminated with a RESERVATION CONFLICT status. If a reservation conflict precludes any part of the command, none of the command shall be performed. COPY commands shall be terminated with CHECK CONDITION status and the sense key shall be set to DATA PROTECT if any part of the copy operation is prohibited by an active reservation. If any extent in a logical unit is reserved in any way, by any initiator, a FORMAT UNIT command shall be rejected with a RESERVATION CONFLICT status. 8.2.12.3. Third Party Reservation (Mandatory). The third-party reservation for the RESERVE command allows an initiator to reserve a logical unit or extents within a logical unit for another SCSI device. This is intended for use in multiple-initiator systems that use the COPY command. Third-party reservation is required. If the third-party (3rdPty) bit is zero, then a third-party reservation is not requested. If the 3rdPty bit is one then the target shall reserve the specified logical unit or extents for the SCSI device specified in the third- party device ID field. The target shall preserve the reservation until it is superseded by another valid RESERVE command from the initiator that made the reservation or until it is released by the same initiator, by a BUS DEVICE reset message from any initiator, or a hard reset condition. The target shall ignore any attempt to release the reservation made by any other initiator. If independent sets of parameters are implemented, a third party reservation shall cause the target to transfer the set of parameters in effect for the initiator of the RESERVE command to the parameters used for commands from the third party device. Any subsequent command issued by the third-party device is executed according to the mode parameters in effect for the initiator that sent the RESERVE command. IMPLEMENTORS NOTE: This transfer of the mode parameters is applicable to target devices which store mode information independently for different initiators. This mechanism allows an initiator to set the mode parameters of a target for the use of a copy master (i.e., the third-party device). The third-party copy master may subsequently issue a MODE SELECT command to modify the mode parameters. 8.2.12.4. Superseding Reservations (Mandatory) An initiator that holds a current reservation (unit or extent) may modify that reservation by issuing another RESERVE command (unit or extent) to the same logical unit. The superseding RESERVE command shall release the previous reservation state (unit or extent) when the new reservation request is granted. If the superseding reservation is for an extent reservation and the current reservation is also an extent reservation, the current extent reservation identification value is used for the superseding reservation. The current reservation shall not be modified if the superseding reservation request cannot be granted. If the superseding reservation cannot be granted because of conflicts with a previous reservation (other than the reservation being superseded), then the target shall return RESERVATION CONFLICT status. IMPLEMENTORS NOTE: Superseding reservations allow the SCSI device ID to be changed on a reservation using the third-party reservation option. This capability is necessary for certain situations when using COMPARE, COPY, and COPY AND VERIFY commands. 8.2.13. REZERO UNIT Command Table 8-27: REZERO UNIT Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (01h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Control | ============================================================================== The REZERO UNIT command (Table 8-27) requests that the target set the logical unit to a specific state. See vendor specifications for details. 8.2.14. SEARCH DATA Commands Table 8-28: SEARCH DATA Commands ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (31h 30h 32h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Invert | Reserved | SpnDat | RelAdr | -----|-----------------------------------------------------------------------| 2 | (MSB) | - - -|- - Logical Block Address - -| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Number of Blocks to Search ---| 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The SEARCH DATA commands (Table 8-28) search one or more logical blocks for equality or inequality to a data pattern. The concept of records within a logical block is used to allow multiple records within a logical block to be searched. The invert bit determines whether the search condition is to be inverted. See 8.2.14.1 through 8.2.14.3 for a description of the search conditions for the individual SEARCH DATA commands. A spanned data (SpnDat) bit of zero indicates that each record shall be wholly contained within a single block. Any space at the end of a block that is smaller than the record length is ignored by the SEARCH DATA commands. A SpnDat bit of one indicates that records span block boundaries (i.e., record may start in one block and end in the next or a subsequent block. The number of blocks to search field specifies the maximum number of contiguous logical blocks to be searched. A value of zero indicates that no logical blocks shall be searched. This condition shall not be considered an error. Any other value indicates the maximum number of logical blocks that shall be searched. A link bit (see 6.2.7) of zero indicates a non-linked command and if the search is satisfied, the command shall be terminated with a CONDITION MET status. A REQUEST SENSE command can then be issued to determine the logical block address and record offset of the matching record. If the search is not satisfied and no error occurs, the command shall be terminated with GOOD status. A link bit (see 6.2.7) of one indicates a command is linked to the SEARCH DATA command and if the search is satisfied, INTERMEDIATE-CONDITION MET status is returned and the next command is executed. If the RelAdr bit in the next command is one, the logical block address of the next command is used as a displacement from the logical block address at which the search was satisfied. If a linked search is not satisfied, the command is terminated with CHECK CONDITION status. A REQUEST SENSE command may then be issued. A REQUEST SENSE command following a satisfied SEARCH DATA command shall: (1) Return a sense key of EQUAL if the search was satisfied by an exact match. If the search was satisfied by an inequality then a sense key of NO SENSE shall be returned. (2) Return the valid bit set to one. (3) Return the logical block address of the logical block containing the first matching record in the information field. (4) Return the record offset of the matching record in the command-specific information field. A REQUEST SENSE command following a SEARCH DATA command that is not satisfied shall: (1) Return a sense key of NO SENSE, if no errors occurred during the command execution. (2) Return the valid bit set to zero. The SEARCH DATA parameter list (Table 8-29) contains a fourteen-byte header, followed by one or more search argument descriptors. Table 8-29: SEARCH DATA Parameter List ============================================================================== Byte | Parameter List Header | ============================================================================== 0 | (MSB) | - - -|- - Logical Record Length - -| 3 | (LSB) | -----|-----------------------------------------------------------------------| 4 | (MSB) | - - -|- - First Record Offset - -| 7 | (LSB) | -----|-----------------------------------------------------------------------| 8 | (MSB) | - - -|- - Number of Records - -| 11 | (LSB) | -----|-----------------------------------------------------------------------| 12 | (MSB) | -----|--- Search Argument Length ---| 13 | (LSB) | ============================================================================== | Search Argument Descriptor(s) | ============================================================================== 0 | (MSB) | - - -|- - Displacement - -| 3 | (LSB) | -----|-----------------------------------------------------------------------| 4 | (MSB) | -----|--- Pattern Length ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 - n| Pattern | ============================================================================== The logical record length field specifies the record length in bytes. The first record offset field specifies the number of bytes that shall be ignored in the first logical block before the search begins. If the value of the first record offset field shall is larger than the logical block length the target shall terminate the command with a CHECK CONDITION status, set the sense key to ILLEGAL REQUEST and set the additional sense code to INVALID FIELD IN PARAMETERS LIST. Subsequent logical blocks shall be searched beginning with the first byte in the logical block. This permits one or more records to be skipped initially. The number of records field specifies the maximum number of records that shall be searched by this command. An search shall terminate when the search pattern is found or when the number of records is exhausted or when the number of blocks to search is exhausted. The search argument length field specifies the length in bytes of all the search argument descriptors that follow. IMPLEMENTORS NOTE: Since the pattern length can vary, there is no fixed multiple of the search argument descriptor to determine the search argument length. The search argument descriptors specify one or more search conditions to execute within a single record in order to satisfy the search. Each search argument descriptor is made up of a displacement field, a pattern length field, and a pattern field. The displacement field specifies the displacement in bytes of the first byte of the data to be compared from the start of the logical record. The pattern length field specifies the length in bytes of the pattern that follows. The pattern field specifies the data to compare to the logical record. 8.2.14.1. SEARCH DATA EQUAL Command The SEARCH DATA EQUAL command (Table 8-28, operation code 31h) shall be satisfied by the first logical record searched that contains data that satisfies all of the search argument descriptor(s). If the invert bit in the command descriptor block is zero, the search argument descriptor(s) shall be satisfied by data in the logical record being equal to the data in the pattern. If the invert bit is one, the search argument descriptor(s) shall be satisfied by data in the logical record being not equal to the data in the pattern. (See 8.2.14.) 8.2.14.2. SEARCH DATA HIGH Command The SEARCH DATA HIGH command (Table 8-28, operation code 30h) shall be satisfied by the first logical record searched that contains data that satisfies all of the search argument descriptor(s). If the invert bit in the command descriptor block is zero, the search argument descriptor(s) shall be satisfied by data in the logical record being greater than the data in the pattern. If the invert bit is one, the search argument descriptor(s) shall be satisfied by data in the logical record being less than or equal to the data in the pattern. (See 8.2.14.) 8.2.14.3. SEARCH DATA LOW Command The SEARCH DATA LOW command (Table 8-28, operation code 32h) shall be satisfied by the first logical record searched that contains data that satisfies all of the search argument descriptor(s). If the invert bit in the command descriptor block is zero, the search argument descriptor(s) shall be satisfied by data in the logical record being less than the data in the pattern. If the invert bit is one, the search argument descriptor(s) shall be satisfied by data in the logical record being greater than or equal to the data in the pattern. (See 8.2.14.) 8.2.15. SEEK(6) and SEEK(10) Commands Table 8-30: SEEK(6) Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (0Bh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | (MSB) | -----|------------------------------ ---| 2 | Logical Block Address | -----|--- ---| 3 | (LSB) | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Control | ============================================================================== Table 8-31: SEEK(10) Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (2Bh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | (MSB) | - - -|- - Logical Block Address - -| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | -----|-----------------------------------------------------------------------| 8 | Reserved | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The SEEK(6) (Table 8-30) and SEEK(10) (Table 8-31) commands request that the logical unit seek to the specified logical block address. 8.2.16. SET LIMITS Command Table 8-32: SET LIMITS Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (33h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | RdInh | WrInh | -----|-----------------------------------------------------------------------| 2 | (MSB) | - - -|- - Logical Block Address - -| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Number of Blocks ---| 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The SET LIMITS command (Table 8-32) defines the range within which subsequent linked commands may operate. A second SET LIMITS command may not be linked to a chain of commands in which a SET LIMITS command has already been issued. The read inhibit (RdInh) bit of one indicates that read operations within the range shall be inhibited. A write inhibit (WrInh) bit of one indicates that write operations within the range shall be inhibited. The logical block address field specifies the starting address for the range. The number of blocks field specifies the number of logical blocks within the range. A number of blocks of zero indicates that the range shall extend to the last logical block on the logical unit. Any attempt to access outside of the restricted range or any attempt to perform an inhibited operation within the restricted range shall not be performed. The command shall be terminated with CHECK CONDITION status and the sense key shall be set to DATA PROTECT. A second SET LIMITS command within a linked list of commands shall be rejected with CHECK CONDITION status and the sense key shall be set to DATA PROTECT. 8.2.17. START STOP UNIT Command Table 8-33: START STOP UNIT Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (1Bh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | Immed | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | LoEj | Start | -----|-----------------------------------------------------------------------| 5 | Control | ============================================================================== The START STOP UNIT command (Table 8-33) requests that the target enable or disable the logical unit for media access operations. An immediate (Immed) bit of one indicates that status shall be returned as soon as the command descriptor block has been validated. An Immed bit of zero indicates that status shall be returned after the operation is completed. A load eject (LoEj) bit of zero requests that no action be taken regarding loading or ejecting the medium. A LoEj bit of one requests that the medium shall be be unloaded if the start bit is zero. A LoEj bit of one requests that the medium is to be loaded if the start bit is one. A start bit of one requests the logical unit be made ready for use. A start bit of zero requests that the logical unit be stopped (media cannot be accessed by the initiator). Targets that contain cache memory shall implicitly perform a SYNCHRONIZE CACHE command for the entire medium prior to executing the STOP UNIT command. 8.2.18. SYNCHRONIZE CACHE Command Table 8-34: SYNCHRONIZE CACHE Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (35h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | Immed | RelAdr | -----|-----------------------------------------------------------------------| 2 | (MSB) | - - -|- - Logical Block Address - -| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Number of Blocks ---| 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The SYNCHRONIZE CACHE command (Table 8-34) ensures that logical blocks in the cache memory, within the specified range, have their most recent data value recorded on the physical medium. If a more recent data value for a logical block within the specified range exists in the cache memory than on the physical medium, then the logical block from the cache memory shall be written to the physical medium. Logical blocks are not necessarily removed from the cache memory as a result of the synchronize cache operation. An immediate (Immed) bit of one indicates that the target shall return status as soon as the command descriptor block has been validated. An Immed bit of zero indicates that the status shall not be returned until the operation has been completed. If the Immed bit is one and the target does not support it and the command shall terminate with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST and the additional sense code shall be set to INVALID FIELD IN CDB. See 8.2.2 for a definition of the RelAdr bit and the logical block address field. The number of blocks field specifies the total number of contiguous logical blocks within the range. A number of blocks of zero indicates that all remaining logical blocks on the logical unit shall be within the range. A logical block within the specified range that is not in cache memory is not considered an error. 8.2.19. VERIFY Command Table 8-35: VERIFY Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (2Fh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | DPO |Reserved|Reserved| BytChk | RelAdr | -----|-----------------------------------------------------------------------| 2 | (MSB) | - - -|- - Logical Block Address - -| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Verification Length | 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The VERIFY command (Table 8-35) requests that the target verify the data written on the medium. If the MODE SELECT command is implemented, and the verify error recovery parameters page is also implemented, then the current settings in that page specifies the verification error criteria. If the verify error recovery parameters page is not implemented, then the verification criteria is vendor- specific. A byte check (BytChk) bit of zero causes a medium verification to be performed with no data comparison. A BytChk bit of one causes a byte-by-byte compare of data written on the medium and the data transferred from the initiator. If the compare is unsuccessful for any reason, the target shall return CHECK CONDITION status with the sense key set to MISCOMPARE. See 8.2.2 for a definition of the RelAdr bit and the logical block address field. The verification length field specifies the number of contiguous logical blocks of data that shall be verified. A transfer length of zero indicates that no logical blocks shall be verified. This condition shall not be considered as an error. Any other value indicates the number of logical blocks that shall be verified. See 8.2.6 for a description of the cache control bit (DPO). 8.2.20. WRITE(6) Command Table 8-36: WRITE(6) Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (0Ah) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | (MSB) | -----|------------------------------ ---| 2 | Logical Block Address | -----|--- ---| 3 | (LSB) | -----|-----------------------------------------------------------------------| 4 | Transfer Length | -----|-----------------------------------------------------------------------| 5 | Control | ============================================================================== The WRITE(6) command (Table 8-36) requests that the target write the data transferred by the initiator to the medium. The cache control bits (see 8.2.6) are not provided for this command. Targets with cache memory may have values for the cache control bits which may affect the WRITE(6) command, however no default value is defined by this standard. If explicit control is required, the WRITE(10) command should be used. The logical block address field specifies the logical block at which the write operation shall begin. The transfer length field specifies the number of contiguous logical blocks of data to transferred. A transfer length of zero indicates that 256 logical blocks shall be transferred. Any other value indicates the number of logical blocks that shall be transferred. 8.2.21. WRITE(10) Command Table 8-37: WRITE(10) Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (2Ah) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | DPO | FUA |Reserved|Reserved| RelAdr | -----|-----------------------------------------------------------------------| 2 | (MSB) | - - -|- - Logical Block Address - -| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Transfer Length | 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The WRITE(10) command (Table 8-37) requests that the target write the data transferred by the initiator to the medium. See READ(10) command (8.2.6) for a definition of the cache control bits (DPO and FUA). See 8.2.2 for a definition of the RelAdr bit and the logical block address field. The transfer length field specifies the number of contiguous logical blocks of data that shall be transferred. A transfer length of zero indicates that no logical blocks shall be transferred. This condition shall not be considered an error and no data shall be written. Any other value indicates the number of logical blocks that shall be transferred. 8.2.22. WRITE AND VERIFY Command Table 8-38: WRITE AND VERIFY Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (2Eh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | DPO |Reserved|Reserved| BytChk | RelAdr | -----|-----------------------------------------------------------------------| 2 | (MSB) | - - -|- - Logical Block Address - -| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Transfer Length | 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The WRITE AND VERIFY command (Table 8-38) requests that the target write the data transferred from the initiator to the medium and then verify that the data is correctly written. The data is only transferred once from the initiator to the target. If the MODE SELECT command is implemented, and the verify error recovery page is also implemented (see 8.3.3.8), then the current settings in that page along with the AWRE bit from the read-write error recovery page specify the verification error criteria. If these pages are not implemented, then the verification criteria is vendor-specific. A byte check (BytChk) bit of zero requests a medium verification to be performed with no data comparison. A BytChk bit of one requests a byte-by- byte compare of data written on the medium and the data transferred from the initiator. If the compare is unsuccessful for any reason, the target shall return CHECK CONDITION status with the sense key set to MISCOMPARE. See 8.2.2 for a definition of the RelAdr bit and the logical block address field. See WRITE(10) command (8.2.21) for a definition of the transfer length field. See 8.2.6 for a description of the cache control bit (DPO). IMPLEMENTORS NOTE: The WRITE AND VERIFY command specifically states that the data are not to be transferred twice (i.e., once for the write pass, and once for the verify pass) when performing a byte compare. If there is a need for two transfers to occur (e.g., to ensure the integrity of the path to the media), then the initiator should issue a WRITE command with a LINK bit of one followed by a VERIFY command with a BytCmp bit of one, transferring the same data on each command. 8.2.23. WRITE LONG Command Table 8-39: WRITE LONG Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (3Fh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | RelAdr | -----|-----------------------------------------------------------------------| 2 | (MSB) | - - -|- - Logical Block Address - -| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Byte Transfer Length | 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The WRITE LONG command (Table 8-39) requests that the target write the data transferred by the initiator to the medium. The data passed during the WRITE LONG command is implementation specific, but shall include the data bytes and the ECC bytes. IMPLEMENTORS NOTE: Any other bytes that can be corrected by ECC should be included (e.g., a data synchronization mark within the area covered by ECC). The READ LONG command is usually issued before issuing a WRITE LONG command. The WRITE LONG data should be the same length and in the same order as the data returned by the READ LONG command. See 8.2.2 for a definition of the RelAdr bit and the logical block address field. The byte transfer length field should specify the number of bytes of data that the target would return for the READ LONG command. If a non-zero byte transfer length does not exactly match the data length the target would return for the READ LONG command, then the target shall terminate the command with CHECK CONDITION status and a sense key of ILLEGAL REQUEST and an additional sense code of INVALID FIELD IN CDB. The ILI and valid bits shall be set to one and the information field shall be set to the difference (residue) of the requested length minus the actual length in bytes. Negative values shall be indicated by two's complement notation. A transfer length of zero indicates that no bytes shall be transferred and shall not be considered an error. 8.2.24. WRITE SAME Command Table 8-40: WRITE SAME Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (41h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | PBdata | LBdata | RelAdr | -----|-----------------------------------------------------------------------| 2 | (MSB) | - - -|- - Logical Block Address - -| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Number of Blocks | 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The WRITE SAME command (Table 8-40) requests that the target write the single block of data transferred by the initiator to the medium multiple times. IMPLEMENTORS NOTE: This command is useful if large areas of the medium need to be written, prepared for certification, or otherwise initialized without the initiator having to transfer all the data. A logical block data (LBdata) bit of one requests that the target replace the first four bytes of the data to be written to the current logical block with the logical block address of the block currently being written. A physical block data (PBdata) bit of one requests that the target replace the first eight bytes of the data to be written to the current physical sector with the physical address of the sector currently being written using the physical sector format (see Table 8-8). If PBdata and LBdata are one the command shall be terminated with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST. See 8.2.2 for a definition of the RelAdr bit and the logical block address field. The number of blocks field specifies the number of contiguous logical blocks to be written. A number of blocks field of zero requests that all the remaining logical blocks on the medium be written. 8.3. Parameters for Direct-Access Devices 8.3.1. Diagnostic Parameters This section defines the descriptors and pages for diagnostic parameters used with direct-access devices. The diagnostic page codes for direct-access devices are defined in Table 8- 41. Table 8-41: Diagnostic Page Codes ============================================================================== Page Code Description Section ------------ ---------------------------------------------------- ---------- 00h Supported Diagnostic Pages 7.3.1.1 40h Translate Address Page 8.3.1.1 01h - 3Fh Reserved (for all device type pages) 41h - 7Fh Reserved 80h - FFh Vendor-specific pages ============================================================================== 8.3.1.1. Translate Address Page - SEND DIAGNOSTIC The translate address page allows the initiator to translate a logical block address, physical sector address or physical bytes from index address into any one of the other formats. The address to be translated is passed to the target with the SEND DIAGNOSTIC command and the results are returned to the initiator by the RECEIVE DIAGNOSTIC RESULTS command. The format of the translate address page - SEND DIAGNOSTIC is shown in Table 8-42. The translated address is returned in the translate address page - RECEIVE DIAGNOSTIC RESULTS (see Table 8-43). Table 8-42: Translate Address Page - SEND DIAGNOSTIC ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Page Code (40h) | -----|-----------------------------------------------------------------------| 1 | Reserved | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- Page Length (000Ah) ---| 3 | (LSB) | -----|-----------------------------------------------------------------------| 4 | Reserved | Supplied Format | -----|-----------------------------------------------------------------------| 5 | Reserved | Translate Format | -----|-----------------------------------------------------------------------| 6 | | - - -|- - Address to Translate - -| 13 | | ============================================================================== The supplied format field specifies the format of address to translate field. Valid values for this field are defined in the FORMAT UNIT command (see Table 8-5). If the target does not support the requested format it shall terminate the SEND DIAGNOSTIC command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST and an additional sense code shall be set to INVALID FIELD IN PARAMETER LIST. The translate format field specifies which format the initiator would like the address to be translated to. Valid values for this field are defined in the FORMAT UNIT command (see Table 8-5). If the target does not support the requested format it shall terminate the command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST and an additional sense code shall be set to INVALID FIELD IN PARAMETER LIST. The address to translate field contains a single address the initiator is requesting the target to translate. The format of this field depends on the value in the supplied format field. The formats are described in Tables 8-8, 8-9 and 8-10. If the logical block format is specified the block address shall be in the first four bytes of the field with the remaining bytes set to zero. 8.3.1.2. Translate Address Page - RECEIVE DIAGNOSTIC The translate address page allows the initiator to translate a logical block address, physical sector address, or physical bytes from index address into any one of the other formats. The address to be translated is passed to the target with the SEND DIAGNOSTIC command and the results are returned to the initiator by the RECEIVE DIAGNOSTIC RESULTS command. The translated address is returned in the translate address page - RECEIVE DIAGNOSTIC (Table 8-43). Table 8-43: Translate Address Page - RECEIVE DIAGNOSTIC ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Page Code (40h) | -----|-----------------------------------------------------------------------| 1 | Reserved | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- Page Length ---| 3 | (LSB) | -----|-----------------------------------------------------------------------| 4 | Reserved | Supplied Format | -----|-----------------------------------------------------------------------| 5 | RAREA | ALTSEC | ALTTRK | Reserved | Translated Format | -----|-----------------------------------------------------------------------| 6 | | - - -|- - Translated Address 1 - -| 13 | | -----|-----------------------------------------------------------------------| 14 | | - - -|- - Translated Address 2 (if required) - -| 21 | | - - -|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| n | | - - -|- - Translated Address n (if required) - -| nn | | ============================================================================== The translate address page contains a four byte page header which specifies the page code and length followed by two bytes which describe the translated address followed by zero or more translated address(s). The page length field contains the number of parameter bytes which follow. The supplied format field contains the value from the SEND DIAGNOSTIC command supplied format field (see 8.3.1.1). A reserved area (RAREA) bit of one indicates that all or part of the translated address falls within a reserved area of the medium (e.g., speed tolerance gap, alternate sector, vendor reserved area, etc.). If the entire translated address falls within a reserved area the target may not return a translated address. An RAREA bit of zero indicates that no part of the translated address falls within a reserved area of the medium. An alternate sector (ALTSEC) bit of one indicates that the translated address is physically located in an alternate sector of the medium. If the target cannot determine if all or part of the translated address is located in an alternate sector it shall set this bit to zero. An ALTSEC bit of zero indicates that no part of the translated address is located in an alternate sector of the medium or that the target is unable to determine this information. An alternate track (ALTTRK) bit of one indicates that part or all of the translated address is located on an alternate track of the medium or the target cannot determine if all or part of the translated address is located on an alternate track. An ALTTRK bit of zero indicates that no part of the translated address is located on an alternate track of the medium. The translated format field contains the value from the SEND DIAGNOSTIC command translate format field (see 8.3.1.1). The translated address field contains the address(s) the target translated from the address supplied by the initiator in the SEND DIAGNOSTIC command. This field shall be in the format specified in the translate format field. The different formats are described in Tables 8-8, 8-9 and 8-10. If the logical block format is specified the block address shall be in the first four bytes of the field and the remaining bytes shall be set to zero. If the returned data is in the logical block or physical sector format and the address to be translated covers more than one address after it has been translated (e.g., accounting for speed tolerance or multiple physical sectors within a single logical block or multiple logical blocks within a single physical sector) the target shall return all possible addresses which are contained in the area specified by the address to be translated. If the returned data is in bytes from index format the target shall return a pair of translated values for each of the possible addresses which are contained in the area specified by the address to translate field. Of the pair of translated values returned, the first indicates the starting location and the second the ending location of the area. 8.3.2. Log Parameters This section defines the descriptors and pages for log parameters used with direct-access devices. The log page codes for direct-access devices are defined in Table 8-44. Table 8-44: Log Page Codes ============================================================================== Page Code Description Section ------------------------------------------------------------------------------ 01h Buffer Over-Run/Under-Run Page 7.3.2.1 03h Error Counter Page (Read) Page 7.3.2.2 05h Error Counter Page (Verify) Page 7.3.2.2 02h Error Counter Page (Write) Page 7.3.2.2 07h Last n Error Events Page 7.3.2.3 06h Non-Medium Error Page 7.3.2.4 00h Supported Log Pages 7.3.2.5 04h Reserved 08h - 2Fh Reserved 3Fh Reserved 30h - 3Eh Vendor-specific pages ============================================================================== 8.3.3. Mode Parameters This section defines the descriptors and pages for mode parameters used with direct-access devices. The mode parameter list, including the mode parameter header and mode block descriptor are described in 7.3.3. The medium-type code field is contained in the mode parameter header (see Table 7-61 and 7-62). Table 8-45 defines this field for direct-access devices. Table 8-45: Direct-Access Medium-Type Codes ============================================================================== Code Value Medium Type ---------- ------------------------------------------------------------------ 00h Default medium type (currently mounted medium type) 01h Flexible disk, single-sided; unspecified medium 02h Flexible disk, double-sided; unspecified medium Flexible Disks Diameter Bit Density Track Density Number Reference mm (inch) Bits/Radian /mm (/inch) Of Sides Standard ---------- ----------- ------------- -------- ---------------- 05h 200 (8.0) 6631 1.9 (48) 1 ANSI X3.73-1980 06h 200 (8.0) 6631 1.9 (48) 2 (Note 1) 09h 200 (8.0) 13262 1.9 (48) 1 None 0Ah 200 (8.0) 13262 1.9 (48) 2 ANSI X3.121-1984 0Dh 130 (5.25) 3979 1.9 (48) 1 ANSI X3.82-1980 12h 130 (5.25) 7958 1.9 (48) 2 ANSI X3.125-1985 16h 130 (5.25) 7958 3.8 (96) 2 ANSI X3.126-1986 1Ah 130 (5.25) 13262 3.8 (96) 2 ISO DIS8630-1985 1Eh 90 (3.5) 7958 5.3 (135) 2 ANSI X3.137 (Note 2) Direct-Access Magnetic Tapes Width Density Reference mm (inch) Tracks ftpmm (ftpi) Standard ----------- ------ ------------ ----------- 40h 6.3 (0.25) 12 394 (10000) Note 1 44h 6.3 (0.25) 24 394 (10000) Note 1 80h - FFh Vendor-Specific All others Reserved ============================================================================== NOTES: (1) See Appendix D for additional standards information. (2) This standard is under development. Please contact the Secretariat for current information on status and availability. The device specific parameter field (Table 8-46) is contained in the mode parameter header (see Table 7-61 and 7-62). Table 8-46: Device Specific Parameter ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | ============================================================================== | WP | Reserved | DPOFUA | Reserved | ============================================================================== A write protect (WP) bit of zero indicates that the medium is write enabled. A WP bit of one indicates that the medium is write protected. When used with the MODE SELECT command, the DPOFUA bit is not used and the field is reserved. When used with the MODE SENSE command, a DPOFUA bit of zero indicates that the target does not contain a cache memory. A DPOFUA bit of one indicates that the target the DPO and FUA bits(see 8.2.6). The density code field is contained in the mode parameter block descriptor (see Table 7-63). This field is reserved for direct-access devices. The mode page codes for direct-access devices are shown in Table 8-47. Table 8-47: Mode Page Codes ============================================================================== Page Code Description Section ------------------------------------------------------------------------------ 08h Caching Page 8.3.3.1 0Ah Control Mode Page 7.3.3.1 02h Disconnect-Reconnect Page 7.3.3.2 05h Flexible Disk Page 8.3.3.2 03h Format Device Page 8.3.3.3 0Bh Medium Types Supported Page 8.3.3.4 0Ch Notch and Partition Page 8.3.3.5 09h Peripheral Device Page 7.3.3.3 01h Read-Write Error Recovery Page 8.3.3.6 04h Rigid Disk Geometry Page 8.3.3.7 07h Verify Error Recovery Page 8.3.3.8 00h Vendor-Specific (does not require page format) 06h Reserved 0Dh - 1Fh Reserved 3Fh Return all pages (valid only for the MODE SENSE command) 20h - 3Eh Vendor-specific ============================================================================== For direct-access devices, if the notch page is not supported, or if the active notch field in the notch page is zero then each page descriptor specifies mode parameters for the target to use for subsequent operations on the specified logical unit. If the notch page is supported, and the active notch is not zero, then each page descriptor specifies parameters for the target to use for subsequent operations on the disk notch specified by the current value of the active notch field on the specified logical unit. 8.3.3.1. Caching Page Table 8-48: Caching Page ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | PS |Reserved| Page Code (08h) | -----|-----------------------------------------------------------------------| 1 | Page Length (0Ah) | -----|-----------------------------------------------------------------------| 2 | Reserved | WCE | MF | RCD | -----|-----------------------------------------------------------------------| 3 | Demand Read Retention Priority | Write Retention Priority | -----|-----------------------------------------------------------------------| 4 | (MSB) | -----|--- Disable Pre-fetch Transfer Length ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | (MSB) | -----|--- Minimum Pre-fetch ---| 7 | (LSB) | -----|-----------------------------------------------------------------------| 8 | (MSB) | -----|--- Maximum Pre-fetch ---| 9 | (LSB) | -----|-----------------------------------------------------------------------| 10 | (MSB) | -----|--- Maximum Pre-fetch Ceiling ---| 11 | (LSB) | ============================================================================== The caching parameters page (Table 8-48) defines the parameters that affect the use of the cache. The parameters savable (PS) bit is only used with the MODE SENSE command. This bit is reserved with the MODE SELECT command. A PS bit of one indicates that the target is capable of saving the page in a non-volatile vendor- specific location. A write cache enable (WCE) bit of zero specifies that the target shall return GOOD status for a WRITE command after successfully writing all of the data to the medium. A WCE bit of one specifies that the target may return GOOD status for a WRITE command after successfully receiving the data and prior to having successfully written it to the medium. A multiplication factor (MF) bit of zero specifies that the target shall interpret the minimum and maximum pre-fetch fields in terms of the number of logical blocks for each of the respective types of pre-fetch. An MF bit of one specifies that the target shall interpret the minimum and maximum pre- fetch fields to be specified in terms of a scalar number which, when multiplied by the number of logical blocks to be transferred for the current command, yields the number of logical blocks for each of the respective types of pre-fetch. A read cache disable (RCD) bit of zero specifies that the target may return data requested by a READ command by accessing either the cache or media. A RCD bit of one specifies that the target shall transfer all of the data requested by a READ command from the medium (i.e., data cannot be transferred from the cache). The demand read retention priority field (see Table 8-48) advises the target on the retention priority to assign data read into the cache that has also been transferred from the target to the initiator. The write retention priority field (see Table 8-48) advises the target on the retention priority to assign data written into the cache that has also been transferred from the cache memory to the medium. Table 8-49: Demand Read and Write Retention Priority ============================================================================== Value Description ------- ------------------------------------------------------------------- 0h Indicates the target should not distinguish between retaining the indicated data and data placed into the cache memory by other means (e.g., pre-fetch). 1h Demand Read Retention Priority: Data put into the cache via a READ command should be replaced sooner (has lower priority) than data placed into the cache by other means (e.g., pre-fetch). Write Retention Priority: Data put into the cache during a WRITE or WRITE AND VERIFY command should be replaced sooner (has lower priority) than data placed into the cache by other means (e.g., pre-fetch). Fh Demand Read Retention Priority: Data put into the cache via a READ command should not be replaced if there is other data in the cache that was placed into the cache by other means (e.g., pre-fetch) and it may be replaced (i.e., it is not locked). Write Retention Priority: Data put into the cache during a WRITE or WRITE AND VERIFY command should not be replaced if there is other data in the cache that was placed into the cache by other means (e.g., pre-fetch) and it may be replaced (i.e., it is not locked). 2h-Eh Reserved ============================================================================== An anticipatory pre-fetch occurs when data is placed in the cache that has not been requested. This usually happens in conjunction with the reading of data that has been requested. All the following parameters give an indication to the target how it should manage the cache based on the last READ command. An anticipatory pre-fetch may occur based on other information. All the remaining caching parameters are only recommendations to the target and should not cause a CHECK CONDITION to occur if the target cannot satisfy the request. The disable pre-fetch transfer length field specifies the selective disabling of anticipatory pre-fetch on long transfer lengths. The value in this field is compared to the number of blocks requested by the current READ command. If the number of blocks is greater than the disable pre-fetch transfer length, then an anticipatory pre-fetch is not done for the command. Otherwise the target should attempt an anticipatory pre-fetch. If the pre- fetch disable transfer length is set to zero, then all anticipatory pre- fetching is disabled for any request for data, including those for zero logical blocks. The minimum pre-fetch field specifies either a number of blocks or a scalar multiplier of the transfer length, depending upon the setting of the MF bit. In either case, the resulting number of blocks is the number to pre-fetch regardless of the delays it might cause in executing subsequent commands. The pre-fetching operation begins at the logical block immediately after the last logical block of the previous READ command. Pre-fetching shall always halt before the end of the media. Errors that occur during the pre-fetching operation shall not be reported to the initiator unless that target cannot, as a result of the error, execute subsequent commands correctly. In this case the error may be reported either immediately as an error for the current READ command, or as a deferred error, at the discretion of the target and according to the rules for reporting deferred errors. A minimum pre-fetch field of zero indicates that pre-fetching should be terminated whenever another command is ready for executing. This consideration is ignored when the minimum pre-fetch is equal to the maximum pre-fetch. The maximum pre-fetch field specifies either a number of blocks or a scalar multiplier of the transfer length, depending upon the setting of the MF bit. In either case, the resulting number of blocks is the number to pre-fetch if there are no delays in executing subsequent commands. The maximum pre-fetch field contains the maximum amount of data to pre-fetch into the cache as a result of one READ command. It is used in conjunction with the disable pre-fetch transfer length and maximum pre-fetch ceiling parameters to trade off pre-fetching new data with displacing old data already stored in the cache. The maximum pre-fetch ceiling field specifies an upper limit on the number of logical blocks computed as the maximum pre-fetch. If this number of blocks is greater than the maximum pre-fetch ceiling, then the number of logical blocks to maximally pre-fetch shall be truncated to the value stored in the ceiling field. IMPLEMENTORS NOTE: If the MF bit is one the maximum pre-fetch ceiling field is useful in limiting the amount of data to be pre-fetched. 8.3.3.2. Flexible Disk Page Table 8-50: Flexible Disk Page (Bytes 0-19) ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | PS |Reserved| Page Code (05h) | -----|-----------------------------------------------------------------------| 1 | Page Length in Bytes (1Eh) | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- Transfer Rate ---| 3 | (LSB)| -----|-+---------------------------------------------------------------------| 4 | Number of Heads | -----|-----------------------------------------------------------------------| 5 | Sectors per Track | -----|-----------------------------------------------------------------------| 6 | (MSB) | -----|--- Data Bytes per Sector ----| 7 | (LSB)| -----|-+---------------------------------------------------------------------| 8 | (MSB) | -----|--- Number of Cylinders ---| 9 | (LSB)| -----|-----------------------------------------------------------------------| 10 | (MSB) | -----|--- Starting Cylinder-Write Precompensation | 11 | (LSB)| -----|-+--------------------------------------------------------------------| 12 | (MSB) | -----|--- Starting Cylinder-Reduced Write Current | 13 | (LSB)| -----|-----------------------------------------------------------------------| 14 | (MSB) | -----|--- Drive Step Rate ---| 15 | (LSB)| -----|-+---------------------------------------------------------------------| 16 | Drive Step Pulse Width | -----|-----------------------------------------------------------------------| 17 | (MSB) | -----|--- Head Settle Delay ---| 18 | (LSB)| -----|-----------------------------------------------------------------------| 19 | Motor on Delay | ============================================================================== The definition of this page is continued. Table 8-51: Flexible Disk Page (Bytes 20-31) ============================================================================== Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 20 | Motor off Delay | -----|-----------------------------------------------------------------------| 21 | TRDY | SSN | MO | Reserved | -----|-----------------------------------------------------------------------| 22 | Reserved | SPC | -----|-----------------------------------------------------------------------| 23 | Write Compensation | -----|-----------------------------------------------------------------------| 24 | Head Load Delay | -----|-----------------------------------------------------------------------| 25 | Head Unload Delay | -----|-----------------------------------------------------------------------| 26 | Pin 34 | Pin 2 | -----|-----------------------------------------------------------------------| 27 | Pin 4 | Pin 1 | -----|-+---------------------------------------------------------------------| 28 | (MSB) | -----|--- Medium Rotation Rate ---| 29 | (LSB) | -----|-----------------------------------------------------------------------| 30 | Reserved | -----|-----------------------------------------------------------------------| 31 | Reserved | ============================================================================== The flexible disk page (Tables 8-50 and 8-51) contains parameters for control and reporting of flexible disk drive parameters. This page is 32 bytes in length. Bytes 0-19 are defined in Table 8-49 and bytes 20-31 are defined in Table 8-50. The parameters savable (PS) bit is only used with the MODE SENSE command. This bit is reserved with the MODE SELECT command. A PS bit of one indicates that the target is capable of saving the page in a non-volatile vendor- specific location. IMPLEMENTORS NOTE: This page is mainly intended for defining parameters of flexible disk drives, but may be used for other devices, if applicable. The transfer rate indicates in kilobits per second the data rate of the peripheral device. Common Transfer Rates ------------------------------------------ MSB LSB DESCRIPTION OF TRANSFER RATE --- --- ------------------------------ 00h FAh 250 kbit/second transfer rate 01h 2Ch 300 kbit/second transfer rate 01h F4h 500 kbit/second transfer rate 03h E8h 1 megabit/second transfer rate 07h D0h 2 megabit/second transfer rate 13h 88h 5 megabit/second transfer rate ------------------------------------------ The number of heads field specifies the number of heads used for reading and writing data on the medium. Heads used exclusively for servo information are excluded. The sectors per track field specifies the number of sectors per revolution per head. The data bytes per sector field specifies the number of bytes of data per sector that an initiator can read or write. The number of cylinders field specifies the number of cylinders used for data storage. The starting cylinder for write precompensation field specifies the cylinder at which write precompensation is to begin. Cylinders are numbered starting with zero. If the starting cylinder for write precompensation is equal to the value in the number of cylinders field, write precompensation shall be disabled by the target. The starting cylinder for reduced write current field specifies cylinder at which write current is reduced. Cylinders are numbered starting with zero. If the starting cylinder for reduced write current is equal to the value in the number of cylinders field, reduced write current shall be disabled by the target. The drive step rate field specifies the step rate in units of 100 microseconds. This value may be rounded as defined in 6.5.4. A value of zero requests the target to set its default value. The drive step pulse width field specifies the width of the step pulse in microseconds. This value may be rounded as defined in 6.5.4. A value of zero requests the target to set its default value. The head settle delay field specifies the head settle time in units of 100 microseconds. This value may be rounded as defined in 6.5.4. A value of zero requests the target to set its default value. If a true ready signal is not available, the motor on delay field specifies in tenths of a second the time that the target shall wait before attempting to access the medium after the motor on signal is asserted. If a true ready signal is available, the motor on delay field specifies in tenths of a second the time that the target shall wait for drive ready status before aborting an attempt to access the medium. This value may be rounded as defined in 6.5.4. The motor off delay field specifies in tenths of a second the time that the target shall wait before releasing the motor on signal after an idle condition exists. A value of FFh indicates that the motor on signal shall not be released. The START STOP UNIT command is not affected by this parameter. This value may be rounded as defined in 6.5.4. A true ready (TRDY) bit of one specifies that a signal is provided that indicates the medium is ready to be accessed. A start sector number (SSN) bit of one specifies that sectors are numbered starting with one. An SSN bit of zero specifies that sectors are numbered starting with zero. A motor on (MO) bit of one specifies that pin 16 (motor on) shall remain released. This bit shall be set to one when using high capacity (192 tracks per inch) drives and their pre-formatted diskettes. An MO bit of zero indicates that pin 16 (motor on) shall be asserted. The step pulse per cylinder (SPC) field is used to specify the number of additional step pulses required per cylinder. Non-zero values allow a drive to read a diskette formatted on a drive with a lower number of tracks per inch. For example, a value of one allows a 96 track-per-inch drive to access tracks on a diskette that was formatted for 48 tracks per inch. The write compensation field is used to specify the amount of write compensation to be used starting at the cylinder specified in the starting cylinder for write precompensation field. The correlation of any values used in this field to actual write precompensation time values is vendor-specific. If a zero is specified in this field the target shall use its default write precompensation value. This value may be rounded as defined in 6.5.4. The head load delay field specifies the head loading time in milliseconds. This value may be rounded as defined in 6.5.4. A value of zero requests the target to set its default value. The head unload delay field specifies the head unloading time in milliseconds. This value may be rounded as defined in 6.5.4. A value of zero requests the target to set its default value. The Pin 34 field defines the usage of pin 34 of the flexible disk drive interface. This use of this pin varies among vendors and drives. The following settings allow the initiator to select how pin 34 shall be used by the interface. Bit 7 6 5 4 Pin 34 Use ------------------- ------------------------- P 0 0 0 Open P 0 0 1 Ready P 0 1 0 Disk Changed P 0 1 1 Reserved P 1 X X Reserved - X is 0 or 1 | | +----- Polarity Bit - "0" - Active Low "1" - Active High The Pin 4 field defines the usage of pin 4 of the flexible disk drive interface. This use of this pin varies among drive vendors and drives. The following settings allow the initiator to specify how pin 4 shall be used by the interface. BIT 7 6 5 4 Pin 4 Use ------------------- -------------------------- P 0 0 0 Open P 0 0 1 In Use P 0 1 0 Eject P 0 1 1 Head Load P 1 X X Reserved - X is "0" or "1" | | +----- Polarity Bit - "0" - Active Low "1" - Active High The Pin 1 field defines the usage of pin 1 of the flexible disk drive interface. This use of this pin varies among vendors and drives. The following settings allow the initiator to specify how pin 1 shall be used by the interface. Bit 3 2 1 0 Pin 1 Use ------------------- ------------------------ P 0 0 0 Open (Pin 1 is not used) P 0 0 1 Disk Change Reset P 0 1 X Reserved P 1 X X Reserved | | +----- Polarity Bit - "0" - Active Low "1" - Active High The medium rotation rate field specifies the speed at which the medium rotates. The unit of measure is rotations per minute (e.g., 2400 rpm). This field cannot be changed by a MODE SELECT command. 8.3.3.3. Format Device Page Table 8-52: Format Device Page ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | PS |Reserved| Page Code (03h) | -----|-----------------------------------------------------------------------| 1 | Page Length (16h) | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- Tracks per Zone ---| 3 | (LSB) | -----|-----------------------------------------------------------------------| 4 | (MSB) | -----|--- Alternate Sectors per Zone ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | (MSB) | -----|--- Alternate Tracks per Zone ---| 7 | (LSB) | -----|-----------------------------------------------------------------------| 8 | (MSB) | -----|--- Alternate Tracks per Logical Unit ---| 9 | (LSB) | -----|-----------------------------------------------------------------------| 10 | (MSB) | -----|--- Sectors per Track ---| 11 | (LSB) | -----|-----------------------------------------------------------------------| 12 | (MSB) | -----|--- Data Bytes per Physical Sector ---| 13 | (LSB) | -----|-----------------------------------------------------------------------| 14 | (MSB) | -----|--- Interleave ---| 15 | (LSB) | -----|-----------------------------------------------------------------------| 16 | (MSB) | -----|--- Track Skew Factor ---| 17 | (LSB) | -----|-----------------------------------------------------------------------| 18 | (MSB) | -----|--- Cylinder Skew Factor ---| 19 | (LSB) | -----|-----------------------------------------------------------------------| 20 | SSEC | HSEC | RMB | SURF | Reserved | -----|-----------------------------------------------------------------------| 21 | | - - -|- - Reserved - -| 23 | | ============================================================================== The format device page (Table 8-52) contains parameters which specify the medium format. The parameters savable (PS) bit is only used with the MODE SENSE command. This bit is reserved with the MODE SELECT command. A PS bit of one indicates that the target is capable of saving the page in a non-volatile vendor- specific location. IMPLEMENTORS NOTE: If the initiator changes any of the current physical parameters defined below, the target may not be able to access the media until a FORMAT UNIT command has been successfully completed. If the defect handling format parameters (tracks per zone, alternate sectors per zone, alternate tracks per zone and alternate tracks per logical unit) requested by the initiator are not supported by the target the target may round these fields to acceptable values as described in 6.5.4. The tracks per zone field specifies the number of tracks per zone to use in dividing the capacity of the device for the purpose of allocating alternate sectors. A value of zero means that one zone is defined for the entire device. The last zone on the device might not contain the same number of tracks as the previous zone(s). The alternate sectors per zone field specifies the number of sectors per zone the target shall reserve for defect handling. The target shall de- allocate these sectors from the initiator addressable blocks during the FORMAT UNIT command. If the notch page is implemented and the ND bit of the notch page is one and the active notch field of the notch page is zero, then a value of zero indicates that no alternate sectors shall be reserved. Otherwise, a value of zero indicates that the number of alternate sectors is target specific. The alternate tracks per zone field specifies the number of tracks per zone the target shall reserve for defect handling. The target shall de-allocate these tracks from the initiator addressable blocks during the FORMAT UNIT command. If the notch page is implemented and the ND bit of the notch page is one and the active notch field of the notch page is zero, then a value of zero indicates that no alternate tracks shall be reserved. Otherwise, a value of zero indicates that the number of alternate tracks is target specific. The alternate tracks per logical unit field specifies the number of tracks per logical unit the target shall reserve for defect handling. The target shall de-allocate these tracks from the initiator addressable blocks during the FORMAT UNIT command. If the notch page is implemented and the ND bit of the notch page is one and the active notch field of the notch page is zero, then a value of zero indicates that no alternate tracks shall be reserved. Otherwise, a value of zero indicates that the number of alternate tracks is target specific. The sectors per track field specifies the number of physical sectors included within each track. This number includes any alternate sectors the target may allocate. A value of zero during MODE SELECT indicates that the target shall define the number of sectors per track. For devices with a variable number of sectors per track, the value in MODE SELECT shall be zero and the value reported in MODE SENSE for the number of sectors per track is vendor-specific. The data bytes per physical sector field specifies the number of data bytes per physical sector that the target shall use. This value may be different than the logical block size reported in the MODE SELECT data. The target shall return CHECK CONDITION status if it determines that the combination of this field and the sectors per track field exceed the capability of the medium. A value of zero indicates that the data bytes per physical sector is defined by the target. For MODE SENSE the interleave field returns the same parameter passed in the FORMAT UNIT command, The target shall report this field as target defined in the corresponding MODE SENSE command. For MODE SELECT this field is ignored. IMPLEMENTORS NOTE: It is recommended that this field be marked non- changeable and that initiators send the value returned in MODE SENSE. This allows migration to specifying interleave as a mode parameter instead of in the FORMAT UNIT command. The track skew factor field specifies the number of physical sectors between the last logical block of one track and the first logical block on the next sequential track of the same cylinder. The cylinder skew factor field specifies the number of physical sectors between the last logical block of one cylinder and the first logical block on the next sequential cylinder. The SSEC bit set to one indicates that the target shall use soft sector formatting. The HSEC bit set to one indicates that the target shall use hard sector formatting. The HSEC bit and the SSEC bit are mutually exclusive in MODE SELECT commands. Possible combinations of MODE SENSE Report Default Values SSEC HSEC Description ---- ---- ---------------------------------------------------- 0 0 Target shall not return this combination 1 0 Target supports soft sector formatting only 0 1 Target supports hard sector formatting only 1 1 Target supports both soft and hard sector formatting Possible combinations of MODE SENSE Report Changeable Values SSEC HSEC Description ---- ---- ---------------------------------------------------- 0 0 Sector formatting Not changeable 1 0 Target shall not return this combination 0 1 Target shall not return this combination 1 1 Target supports both Soft and Hard sector formatting The removable (RMB) bit set to one indicates that the logical unit supports removable media. A RMB bit set to zero indicates that the logical unit does not support removable media. The status of this bit shall be reflected in the INQUIRY command removable media bit (RMB). The surface (SURF) bit set to zero indicates that the target shall allocate progressive addresses to all logical blocks within a cylinder prior to allocating addresses on the next cylinder. A SURF bit set to one indicates that the target shall allocate progressive addresses to all logical blocks on a surface prior to allocating sector addresses on the the next surface. IMPLEMENTORS NOTE: If the target supports savable parameters, all savable parameters for this initiator, including those in page codes 3, 4, and 5, are saved to non-volatile memory when the save parameters bit (SP) in the command descriptor block is set to one. The savable parameters may also be saved to non-volatile memory during a FORMAT UNIT command (see 8.2.1). 8.3.3.4. Medium Types Supported Page Table 8-53: Medium Types Supported Page ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | PS |Reserved| Page Code (0Bh) | -----|-----------------------------------------------------------------------| 1 | Page Length (06h) | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Medium Type One Supported | -----|-----------------------------------------------------------------------| 5 | Medium Type Two Supported | -----|-----------------------------------------------------------------------| 6 | Medium Type Three Supported | -----|-----------------------------------------------------------------------| 7 | Medium Type Four Supported | ============================================================================== The medium types supported page (Table 8-53) contains a list of the medium types implemented by the target for logical units. The parameters savable (PS) bit is only used with the MODE SENSE command. This bit is reserved with the MODE SELECT command. A PS bit of one indicates that the target is capable of saving the page in a non-volatile vendor- specific location. The code values for each medium type supported by the target (up to four maximum), as defined in the MODE SELECT command (see Table 8-35), are reported in ascending order. If only the default medium type is supported zero is reported. If less than four medium types are supported the unused entries shall be returned as zero. 8.3.3.5. Notch and Partition Page Table 8-54: Notch Page ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | PS |Reserved| Page Code (0Ch) | -----|-----------------------------------------------------------------------| 1 | Page Length (16h) | -----|-----------------------------------------------------------------------| 2 | ND | LPN | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | (MSB) | -----|--- Maximum Number of Notches ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | (MSB) | -----|--- Active Notch ---| 7 | (LSB) | -----|-----------------------------------------------------------------------| 8 | (MSB) | - - -|- - Starting Boundary - -| 11 | (LSB) | -----|-----------------------------------------------------------------------| 12 | (MSB) | - - -|- - Ending Boundary - -| 15 | (LSB) | -----|-----------------------------------------------------------------------| 16 | (MSB) | - - -|- - Pages Notched - -| 23 | (LSB) | ============================================================================== The notch page (Table 8-54) contains parameters for direct-access devices which implement a variable number of blocks per cylinder and support this page. Each section of the logical unit with a different number of blocks per cylinder is referred to as a notch. The parameters savable (PS) bit is only used with the MODE SENSE command. This bit is reserved with the MODE SELECT command. A PS bit of one indicates that the target is capable of saving the page in a non-volatile vendor- specific location. A notched drive (ND) bit of zero indicates that the device is not notched and that all other parameters in this page shall be returned as zero by the target. A ND bit of one indicates that the device is notched. For each supported active notch value this page defines the starting and ending boundaries of the notch. A logical or physical notch (LPN) bit of zero indicates that the boundaries are based on the physical parameters of the logical unit. The cylinder is considered most significant, the head least significant. A LPN bit of one indicates that the notch boundaries are based on logical blocks of the logical unit. The maximum number of notches field indicates the maximum number of notches supported by the logical unit. This field shall be reported as unchangeable. The active notch field indicates the notch that this and subsequent MODE SELECT and MODE SENSE commands shall refer to, until the active notch is changed by a later MODE SELECT command. The value of the active notch shall be greater than or equal to 0 and less than or equal to the maximum number of notches. An active notch value of zero indicates that this and subsequent MODE SELECT and MODE SENSE commands refer to the parameters that apply across all notches. The starting boundary field indicates the beginning of the active notch or, if the active notch is zero, the beginning boundary of the logical unit. If the LPN bit is one, then the four bytes represent a logical block address. If the LPN bit is zero, then the three most significant bytes shall represent the cylinder number and the least significant byte shall represent the head number. This field shall be reported as unchangeable. The ending boundary field indicates the ending of the active notch or, if the active notch is zero, the ending of the logical unit. If the LPN bit is one, then the four bytes represent logical block address. If the LPN bit is zero, then the three most significant bytes shall represent the cylinder number and the least significant byte shall represent the head number. This field shall be reported as unchangeable. Each notch shall span a set of consecutive logical blocks on the logical unit, the notches shall not overlap, and no logical block shall be excluded from a notch. The pages notched field is a bit map of the mode page codes that indicates which pages contain parameters that may be different for different notches. The most significant bit of this field corresponds to page code 3Fh and the least significant bit corresponds to page code 00h. If a bit is one, then the corresponding mode page contains parameters that may be different for different notches. If a bit is zero, then the corresponding mode page contains parameters that are constant for all notches. This field shall be reported as unchangeable. 8.3.3.6. Read-Write Error Recovery Page Table 8-55: Read-Write Error Recovery Page ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | PS |Reserved| Page Code (01h) | -----|-----------------------------------------------------------------------| 1 | Page Length (0Ah) | -----|-----------------------------------------------------------------------| 2 | AWRE | ARRE | TB | RC | EER | PER | DTE | DCR | -----|-----------------------------------------------------------------------| 3 | Read Retry Count | -----|-----------------------------------------------------------------------| 4 | Correction Span | -----|-----------------------------------------------------------------------| 5 | Head Offset Count | -----|-----------------------------------------------------------------------| 6 | Data Strobe Offset Count | -----|-----------------------------------------------------------------------| 7 | Reserved | -----|-----------------------------------------------------------------------| 8 | Write Retry Count | -----|-----------------------------------------------------------------------| 9 | Reserved | -----|-----------------------------------------------------------------------| 10 | (MSB) | -----|--- Recovery Time Limit ---| 11 | (LSB) | ============================================================================== The read-write error recovery page (Table 8-55) specifies the error recovery parameters the target shall use during any command that performs a read or write operation to the medium (e.g., READ(6), READ(10), WRITE(6), WRITE(10), COPY, COMPARE, WRITE & VERIFY, etc.). The parameters savable (PS) bit is only used with the MODE SENSE command. This bit is reserved with the MODE SELECT command. A PS bit of one indicates that the target is capable of saving the page in a non-volatile vendor- specific location. An automatic write reallocation enabled (AWRE) bit of one indicates that the target shall enable automatic reallocation to be performed during write operations. The automatic reallocation shall be performed only if the target has the valid data (e.g., original data in the buffer or recovered from the medium). The valid data shall be placed in the reallocated block. Error reporting as required by the error recovery bits (EER, PER, DTE, and DCR) shall be performed only after completion of the reallocation. The reallocation operation shall report any failures that occur. See the REASSIGN BLOCKS command (8.2.10) for error procedures. An AWRE bit of zero indicates that the target shall not perform automatic reallocation of defective data blocks during write operations. An automatic read reallocation enabled (ARRE) bit of one indicates that the target shall enable automatic reallocation of defective data blocks during read operations. All error recovery actions required by the error recovery bits (TB, EER, PER, DTE, and DCR) shall be executed. The automatic reallocation shall then be performed only if the target successfully recovers the data. The recovered data shall be placed in the reallocated block. Error posting as required by the error recovery bits shall be performed only after completion of the reallocation. The reallocation process shall present any failures that occur. See the REASSIGN BLOCKS command (8.2.10) for error procedures. An ARRE bit of zero indicates that the target shall not perform automatic reallocation of defective data blocks during read operations. A transfer block (TB) bit of one indicates that a data block that is not recovered within the recovery limits specified shall be transferred to the initiator before CHECK CONDITION status is returned. A TB bit of zero indicates that such a data block shall not be transferred to the initiator. The TB bit does not affect the action taken for recovered data. A read continuous (RC) bit of one indicates the target shall transfer the entire requested length of data without adding delays to perform error recovery procedures. This implies that the target may send data that is erroneous or fabricated in order to maintain a continuous flow of data. The target shall assign priority to this bit over conflicting error control bits (EER, DCR, DTE, and PER) within this byte. IMPLEMENTORS NOTE: Fabricated data may be data already in the buffer or any other target-specific data. This bit is typically used in image processing, audio, or video applications. A RC bit of zero indicates that error recovery operations that cause delays are acceptable during the data transfer. Data shall not be fabricated. The individual bit definitions for EER, PER, DTE and DCR are contained in Table 8-56. The combinations of these bits are explained in Tables 8-57 through 8-60. Table 8-56: Error Recovery Bit Definitions ============================================================================== EER PER DTE DCR Description ------------------------------------------------------------------------------ 1 - - - An enable early recovery (EER) bit of one indicates that the target shall use of the most expedient form of error recovery first. This bit only applies to data error recovery and it does not affect positioning retries and the message system error recovery procedures. 0 - - - An EER bit of zero indicates that the target shall use an error recovery procedure that minimizes the risk of mis- detection or mis-correction. - 1 - - A post error (PER) bit of one indicates that the target shall report recovered errors. - 0 - - A PER bit of zero indicates that the target shall not report recovered errors. Error recovery procedures shall be performed within the limits established by the error recovery parameters. - - 1 - A disable transfer on error (DTE) bit of one indicates that the target shall terminate the data phase upon detection of a recovered error. - - 0 - A DTE bit of zero indicates that the target shall not terminate the data phase upon detection of a recovered error. - - - 1 A disable correction (DCR) bit of one indicates that error correction codes shall not be used for data error recovery. - - - 0 A DCR bit of zero allows the use of error correction codes for data error recovery. ============================================================================== IMPLEMENTORS NOTE: An EER bit of one may imply an increase in the probability of mis-detection or mis-correction. An EER bit of zero typically means that the specified retry limit is exhausted prior to using error correction codes. Table 8-57: Combined Error Recovery Parameter Descriptions(1) ============================================================================== EER PER DTE DCR Description ------------------------------------------------------------------------------ 0 0 0 0 The full number of retries (specified in the read, write or verify retry count field) and error correction are attempted to recover the data (EER and DCR set to 0). A CHECK CONDITION is not reported at the completion of the command for recovered errors (PER set to 0). The command terminates with CHECK CONDITION status before the transfer count is exhausted only if an unrecoverable error is detected. If an unrecoverable data error occurred, the data in the block with the unrecoverable error may or may not be transferred to the initiator depending on the setting of the transfer block (TB) bit (read operation only). 0 0 0 1 Error correction is disabled (DCR set to one) so only the full number of retries (specified in the read, write or verify retry count field) are attempted to recover the data (EER set to 0). A CHECK CONDITION is not reported at the completion of the command for recoverable errors (PER set to 0). The command terminates with CHECK CONDITION status before the transfer count is exhausted only if an unrecoverable error is detected. If an unrecoverable data error occurred, the data in the block with the unrecoverable error may or may not be transferred to the initiator depending on the setting of the transfer block (TB) bit (read operation only). 0 0 1 0 Invalid mode (PER must be set to one if DTE is set to one). See the note at the end of this table. 0 0 1 1 Invalid mode (PER must be set to one if DTE is set to one). See the note at the end of this table. 0 1 0 0 The full number of retries (specified in the read, write or verify retry count field) and Error Correction are attempted to recover the data (EER and DCR set to 0). The command terminates with CHECK CONDITION status before the transfer count is exhausted only if an unrecoverable error is detected. If an unrecoverable data error occurred, the data in the block with the unrecoverable error may or may not be transferred to the initiator depending on the setting of the transfer block (TB) bit (read operation only). A CHECK CONDITION with a sense key of RECOVERED ERROR is reported at the completion of the command for any recoverable error that occurs (PER set to 1). The information field in the sense data shall contain the logical block address of the last recovered error which occurred during the transfer. ============================================================================== Table 8-58: Combined Error Recovery Parameter Descriptions(2) ============================================================================== EER PER DTE DCR Description ------------------------------------------------------------------------------ 0 1 0 1 Error correction is disabled (DCR set to one) so only the full number of retries (specified in the read, write or verify retry count field) are attempted to recover the data (EER set to 0). The command terminates with CHECK CONDITION status before the transfer count is exhausted only if an unrecoverable error is detected. If an unrecoverable data error occurred, the data in the block with the unrecoverable error may or may not be transferred to the initiator depending on the setting of the transfer block (TB) bit (read operation only). A CHECK CONDITION with a sense key of RECOVERED ERROR is reported at the completion of the command for any recoverable error that occurs (PER set to 1). The information field in the sense data shall contain the logical block address of the last recovered error which occurred during the transfer. 0 1 1 0 The full number of retries (specified in the read, write or verify retry count field) and Error Correction are attempted to recover the data (EER and DCR set to 0). The command terminates with CHECK CONDITION status before the transfer count is exhausted if any error (recoverable or unrecoverable) is detected (DTE set to 1). The information field in the sense data shall contain the logical block address of the block in error. If an unrecoverable data error occurs the data in the block with the error may or may not be transferred to the initiator depending on the setting of the transfer block (TB) bit (read operation only). 0 1 1 1 Error correction is disabled (DCR set to one) so only the full number of retries (specified in the read, write or verify retry count field) are attempted to recover the data (EER set to 0). The command terminates with CHECK CONDITION status before the transfer count is exhausted if any error (recoverable or unrecoverable) is detected (DTE set to 1). The information field in the sense data shall contain the logical block address of the block in error. If an unrecoverable data error occurs the data in the block with the error may or may not be transferred to the initiator depending on the setting of the transfer block (TB) bit (read operation only). ============================================================================== Table 8-59: Combined Error Recovery Parameter Descriptions(3) ============================================================================== EER PER DTE DCR Description ------------------------------------------------------------------------------ 1 0 0 0 The fewest possible retries and error correction are attempted to recover the data (EER set to one and DCR set to 0). A CHECK CONDITION is not reported at the completion of the command for recoverable errors (PER set to 0). The command terminates with CHECK CONDITION status before the transfer count is exhausted only if an unrecoverable error is detected. If an unrecoverable data error occurred, the data in the block with the unrecoverable error may or may not be transferred to the initiator depending on the setting of the transfer block (TB) bit (read operation only). 1 0 0 1 Invalid mode (DCR must be set to zero if EER is set to one). See the note at the end of this table. 1 0 1 0 Invalid mode (PER must be set to one if DTE is set to one). See the note at the end of this table. 1 0 1 1 Invalid mode (PER must be set to one if DTE is set to one). See the note at the end of this table. 1 1 0 0 The fewest possible retries and error correction are attempted to recover the data (EER set to one and DCR set to 0). The command terminates with CHECK CONDITION status before the transfer count is exhausted only if an unrecoverable error is detected. If an unrecoverable data error occurred, the data in the block with the unrecoverable error may or may not be transferred to the initiator depending on the setting of the transfer block (TB) bit (read operation only). A CHECK CONDITION with a sense key of RECOVERED ERROR is reported at the completion of the command for any recoverable error that occurs (PER set to 1). The information field in the sense data shall contain the logical block address of the last recovered error which occurred during the transfer. 1 1 0 1 Invalid mode (DCR must be set to zero if EER is set to one). See the note at the end of this table. ============================================================================== Table 8-60: Combined Error Recovery Parameter Descriptions(4) ============================================================================== EER PER DTE DCR Description ------------------------------------------------------------------------------ 1 1 1 0 The fewest possible retries and error correction are attempted to recover the data (EER set to one and DCR set to 0). The command terminates with CHECK CONDITION status before the transfer count is exhausted if any error (recoverable or unrecoverable) is detected (DTE set to 1). The information field in the sense data shall contain the logical block address of the block in error. If an unrecoverable data error occurs the data in the block with the error may or may not be transferred to the initiator depending on the setting of the transfer block (TB) bit (read operation only). 1 1 1 1 Invalid mode (DCR must be set to zero if EER is set to one). See the note at the end of this table. ============================================================================== NOTE: If an invalid mode for the error recovery combination is sent by the initiator the target shall return CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER LIST. The read and write retry count fields specify the number of times that the target shall attempt its recovery algorithm during read and write operations, respectively. If the retry count field and the recovery time limit field are both specified in a MODE SELECT command, the field that requires the least time for data error recovery actions shall have priority. The correction span field specifies the size, in bits, of the largest data error burst for which data error correction may be attempted. A correction span of zero specifies that the target shall use its default value or that this field is not supported. The head offset count field specifies in two's-complement notation an incremental offset position from the track center to which the heads shall be moved. The effect of this field on write operations is unspecified. A head offset count of zero indicates that no offset is specified. A positive value indicates moving in the direction of increasing logical block addresses. A negative value indicates moving in the direction of decreasing logical block addresses. Any value specified in this field does not preclude the target from using positive or negative head offset during error recovery. However, after any error recovery is completed the target shall return the head offset to the value specified in this field. IMPLEMENTORS NOTE: The degree of offset for each incremental value and the number of valid values are device specific. It is recommended that the number of valid values be equal for the positive and negative head offset counts. The target shall return CHECK CONDITION status and shall set the sense key to ILLEGAL REQUEST if an unsupported head offset value is specified. The valid bit shall be set to one and the information field shall be set to the positive value of the maximum head offset count that is supported. The target shall set the valid bit to zero if it cannot determine the maximum head offset count supported. (Note: If the target does not support this field, it returns a zero value in the MODE SENSE command.) The data strobe offset count field specifies in two's-complement notation an incremental position to which the recovered data strobe shall be adjusted from its nominal setting. The effect of this field on write operations is unspecified. A value of zero indicates that no data strobe offset is specified. A positive value indicates movement in a positive direction as defined by the target. A negative value indicates movement in the negative direction as defined by the target. Any value specified in this field does not preclude the target from using positive or negative data strobe offset during error recovery. However, after any error recovery is completed the target shall return the data strobe offset to the value specified in this field. IMPLEMENTORS NOTE: The degree of offset for each incremental value and the number of valid values are device specific. It is recommended that the number of valid values be equal for the positive and negative data strobe offset counts. The target shall return CHECK CONDITION status and shall set the sense key to ILLEGAL REQUEST if an unsupported data strobe offset count value is specified. The valid bit shall be set to one and the information field shall be set to the positive value of the maximum data strobe offset count that is supported. The target shall set the valid bit to zero if it cannot determine the maximum data strobe offset supported. IMPLEMENTORS NOTE: If the target does not support the data strobe offset count field, it returns a zero value in the MODE SENSE command. The recovery time limit field specifies in increments of one millisecond the maximum time duration that the target shall use for data error recovery procedures. The target may round this value as described in 6.5.4. The limits in this field specifies the maximum error recovery time allowed for any individual logical block. A recovery time limit of zero specifies that the target shall use its default value. If both retry count and recovery time limit are specified, the field that specifies the recovery action of least duration shall have priority. 8.3.3.7. Rigid Disk Drive Geometry Page Table 8-61: Rigid Disk Drive Geometry Page ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | PS |Reserved| Page Code (04h) | -----|-----------------------------------------------------------------------| 1 | Page Length (16h) | -----|-----------------------------------------------------------------------| 2 | (MSB) | - - -|- - Number of Cylinders - -| 4 | (LSB) | -----|-----------------------------------------------------------------------| 5 | Number of Heads | -----|-----------------------------------------------------------------------| 6 | (MSB) | - - -|- - Starting Cylinder-Write Precompensation - -| 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | (MSB) | - - -|- - Starting Cylinder-Reduced Write Current - -| 11 | (LSB) | -----|-+---------------------------------------------------------------------| 12 | (MSB) | -----|--- Drive Step Rate ---| 13 | (LSB) | -----|-----------------------------------------------------------------------| 14 | (MSB) | - - -|- - Landing Zone Cylinder - -| 16 | (LSB) | -----|-----------------------------------------------------------------------| 17 | Reserved | RPL | -----|-----------------------------------------------------------------------| 18 | Rotational Offset | -----|-----------------------------------------------------------------------| 19 | Reserved | -----|-----------------------------------------------------------------------| 20 | (MSB) | -----|--- Medium Rotation Rate ---| 21 | (LSB) | -----|-----------------------------------------------------------------------| 22 | Reserved | -----|-----------------------------------------------------------------------| 23 | Reserved | ============================================================================== The rigid disk drive geometry page (Table 8-61) specifies parameters for direct-access devices employing a rigid disk drive. The parameters savable (PS) bit is only used with the MODE SENSE command. This bit is reserved with the MODE SELECT command. A PS bit of one indicates that the target is capable of saving the page in a non-volatile vendor- specific location. IMPLEMENTORS NOTE: This page is intended to define drive geometry parameters of rigid disk drives. It may be used for other devices if applicable. The number of cylinders field defines the number of physical cylinders used for data storage. The number of heads field defines the physical number of heads used for data storage. Heads used exclusively for servo information are excluded. The starting cylinder for write precompensation field is the physical cylinder at which write precompensation is to begin. The first cylinder is number zero. If the starting cylinder for write precompensation is equal to the value in the number of cylinders field, write precompensation shall be disabled by the target. The starting cylinder for reduced write current field is the physical cylinder at which write current is reduced. The first cylinder is number zero. If the starting cylinder for reduced write current is equal to the value in the number of cylinders field, reduced write current shall be disabled by the target. The drive step rate field indicates the step rate in 100 nanoseconds increments. The target shall use the drive step rate, greater than or equal to the drive step rate specified. If the target rounds this field it shall terminate the command as described in 6.5.4. A value of zero requests the target to set its default value. The landing zone cylinder field indicates two's complement location where the target shall position the disk heads. A negative value indicates that the heads are positioned below cylinder zero by that number of cylinders. A positive value greater than the number of cylinders indicates that the heads are positioned beyond the cylinders used for data storage at the cylinder location specified. A zero indicates that the default should be used. The rotational position locking (RPL) field is used for spindle synchronization as defined in Table 8-62. See Appendix K of the Enhanced Small Device Interface (BSR X3.170-198X) for further information on synchronized spindles. Table 8-62: Rotational Position Locking ============================================================================== RPL Description ------------------------------------------------------------------------------ 00b Indicates that spindle synchronization is disabled or not supported. 01b The target operates as a synchronized-spindle slave. 10b The target operates as a synchronized-spindle master. 11b The target operates as a synchronized-spindle master control. ============================================================================== IMPLEMENTORS NOTE: The signals and connectors used for rotational position locking are external to the SCSI bus and are not part of this standard. If a target fails to achieve synchronization it shall create a unit attention condition to all initiators. The sense key shall be set to UNIT ATTENTION and the additional sense code set to RPL STATUS CHANGE. If subsequent to achieving synchronization the target detects a change of synchronization: (1) and, if the logical unit is not presently executing an I/O process for the initiator, the target shall create a unit attention condition. The sense key shall be set to UNIT ATTENTION and the additional sense code set to RPL STATUS CHANGE. (2) and, if the logical unit is presently executing an I/O process and no other error occurs, then the target shall return CHECK CONDITION status. The sense key shall be set to RECOVERED ERROR if the target is able to complete the I/O process or HARDWARE ERROR if the target is unable to complete the I/O process. The additional sense code is set to RPL STATUS CHANGE. The rotational offset indicates the amount of rotational skew that the target shall use when synchronized. The rotational skew is applied in the retarded direction (lagging the synchronized spindle master control). The value in the field is the numerator of a fractional multiplier that has 256 as its denominator (e.g., a value of 128 indicates a one-half revolution skew). A value of zero indicates that rotational offset shall not be used. This value may be rounded as defined in 6.5.4. The rotational offset is not used when a target is configured as synchronized-spindle master. The medium rotation rate indicates the speed at which the medium rotates. The unit of measure is rotations per minute (e.g., 3600 rpm). 8.3.3.8. Verify Error Recovery Page Table 8-63: Verify Error Recovery Page ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | PS |Reserved| Page Code (07h) | -----|-----------------------------------------------------------------------| 1 | Parameter Length (0Ah) | -----|-----------------------------------------------------------------------| 2 | Reserved | EER | PER | DTE | DCR | -----|-----------------------------------------------------------------------| 3 | Verify Retry Count | -----|-----------------------------------------------------------------------| 4 | Verify Correction Span | -----|-----------------------------------------------------------------------| 5 | Reserved | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | -----|-----------------------------------------------------------------------| 8 | Reserved | -----|-----------------------------------------------------------------------| 9 | Reserved | -----|-----------------------------------------------------------------------| 10 | (MSB) | -----|--- Verify Recovery Time Limit ---| 11 | (LSB) | ============================================================================== The verify error recovery page (Table 8-63) specifies the error recovery parameters the target shall use during the VERIFY command, the verify operation of the WRITE AND VERIFY command and the verify operation of the COPY AND VERIFY command. The parameters savable (PS) bit is only used with the MODE SENSE command. This bit is reserved with the MODE SELECT command. A PS bit of one indicates that the target is capable of saving the page in a non-volatile vendor- specific location. The AWRE bit as defined in the read-write error recovery page (see Table 8- 55) applies to the WRITE AND VERIFY command. The VERIFY and COMPARE commands shall not perform automatic reallocation. The COPY and COPY AND VERIFY commands might or might not perform automatic reallocation depending on the settings of the mode parameters. The EER, PER, DTE and DCR bits are defined in Table 8-56. The combinations of these bits are defined in Tables 8-57 through 8-60. The verify retry count field specifies the number of times that the target shall attempt its recovery algorithm during a verify operation. If the verify retry count and the verify recovery time limit are both specified, the one that requires the least time for data error recovery actions shall have priority. The verify correction span field specifies the size, in bits, of the largest burst data error for which data error correction may be attempted. If the target does not implement this field, a value of zero is returned in MODE SENSE data. The verify recovery time limit field specifies in increments of one millisecond the maximum time duration that the target shall use error recovery procedures to recover data for an individual logical block. The target may round this value as described in 6.5.4. If the verify retry count and the verify recovery time limit are both specified, the one that requires the least time for data error recovery actions shall have priority. IMPLEMENTORS NOTE: To disable all types of correction and retries the initiator should set the EER bit to zero, the PER, DTE and DCR bits to one and the number of retries and recovery time limit to zero. 8.4. Glossary for Direct-Access Devices cache memory. A temporary (and often volatile) data storage area outside the user-accessible area. A cache memory is usually faster to access than the medium and thus has the effect of increasing data throughput by reducing the number of accesses to the medium. non-volatile medium. Physical storage medium that retains data written to it for a subsequent read operation through a power-on condition. An example of this is a disk device that stores data as magnetic fields that do not require device power to exist. notch. A notch refers to all or part of the medium having a consistent set of geometry parameters. Notches are used to increase storage capacity by optimizing the number of sectors per track between the inner and outer tracks. read hit. When the logical block requested for a read operation is accessed from the cache memory, this is called a read hit. user-accessible. The area of the medium that can be read from or written to by READ and WRITE commands. volatile medium. Medium that may not retain data written to it for a subsequent read operation through a power-on condition. An example of this is a silicon memory device that loses data written to it if device power is lost.