QIC-157 Revision B 16 Dec 94 DEVELOPMENT STANDARD ATA PACKET INTERFACE (ATAPI) FOR STREAMING TAPE 311 East Carrillo Street Santa Barbara, California 93101 Telephone (805) 963-3853 Fax (805) 962-1541 Quarter-Inch Cartridge Drive Standards, Inc.
Technical Editor: Paul Boehler Arcada Software 708 Fiero Commerce Park 10 San Luis Obispo, CA 93401 Telephone: (805) 544-1496 Internet: pboehler@arcada.com Assistant Editor: Devon Worrell Western Digital Corporation 8105 Irvine Center Drive Telephone: (714) 932-7042 Internet: worrell@dt.wdc.com Internet Forum: Forum Subscription: idetape@dt.wdc.com majordomo@dt.wdc.
ATAPI For Streaming Tape QIC-157 Rev B Table of Contents I. REVISION HISTORY ................................................................................................................................................ ix 1. ATAPI OVERVIEW.....................................................................................................................................................1 1.1 ATA SIGNAL UTILIZATION............................................................................................
ATAPI For Streaming Tape QIC-157 Rev B 4.1.6 Packet Command.................................................................................................................................................23 4.1.7 ATAPI Identify Device .........................................................................................................................................24 4.1.8 Set Features ......................................................................................................................
ATAPI For Streaming Tape QIC-157 Rev B 6.10 VENDOR IDENTIFICATION LIST .................................................................................................................................101 FIGURE 3-1 ATAPI STATUS REGISTER (ATA STATUS REGISTER) .....................................................................................20 FIGURE 3-2 ATAPI ERROR REGISTER (ATA ERROR REGISTER) ........................................................................................
ATAPI For Streaming Tape QIC-157 Rev B TABLE 6-37 MODE PARAMETER LIST .................................................................................................................................63 TABLE 6-38 MODE PARAMETER HEADER...........................................................................................................................63 TABLE 6-39 MODE PARAMETER BLOCK DESCRIPTOR ........................................................................................................
ATAPI For Streaming Tape QIC-157 Rev B I. Revision History Changes for Revision B: Many clarifications and simplifications were made throughout the specification. Usage of drive seek complete (DSC) line and byte count register have been clarified. All transfer lengths are a multiple of 4 bytes. The incomplete floppy backward compatible model has been removed. Physical block addressing has been removed. The read position command has been simplified.
ATAPI For Streaming Tape QIC-157 Rev B 1. ATAPI Overview The purpose of the ATAPI is to provide a more extensible and general purpose interface than the ATA Task file. Although the attachment of a Streaming Tape on the ATAPI Interface will utilize the ATA Host Hardware and Task File, the logical interface will differ slightly and will need to support additional capabilities.
ATAPI For Streaming Tape QIC-157 Rev B 1.4. Packet Types To allow for generic packet transfer and the connection of SCSI like peripherals, there shall exist a minimum set of information that is exchanged. This information shall generically support the following: • Command Packet (Always padded to number of bytes identified in byte 0 of the Identify Device data. 00 = 12 bytes, 01 = 16 bytes) • Command Parameter Data (e.g. Write Data etc.) • Command Response Data (e.g. Read Data etc.) • Status.
ATAPI For Streaming Tape QIC-157 Rev B Write DMA (wo/retry) N CB V Write long (w/retry) N* 32 V Write long (wo/retry) N* 33 V Write multiple N C5 V Write same N E9 V Write sector(s) (w/retry) N* 30 V Write sector(s) (wo/retry) N* 31 V Write verify N 3C V Invalid command code V V V = valid on this command M = Mandatory and shall be supported by ATAPI Devices, as specified by the ATA Standard O = Optional for use by an ATAPI Device N = Not supported by ATAPI Devices (shall be Aborted by the ATAPI Device) * Th
ATAPI For Streaming Tape QIC-157 Rev B 1.6.1. Redundant Command Functionality (Task File vs. Packet) The SCSI Standard has provided some commands that the ATA Standard also provides. It is the intent of this specification to allow all the functionality to exist, by utilizing only Command Packets. This will allow existing SCSI like Drivers to continue to issue packets for all operation, and has some lower level Driver converting them to the ATAPI protocol. 1.6.2. ATAPI Identify Device vs.
ATAPI For Streaming Tape QIC-157 Rev B 2. ATAPI Protocol The ATAPI Device is commanded by two methods, the original ATA Command protocol utilizing the Task File and the new Packet Command method. For both methods, the Devices using this interface shall be programmed by the Host to perform commands and return status to the Host at command completion.
ATAPI For Streaming Tape QIC-157 Rev B Data transfers may be accomplished in more ways than are described by this specification, but the sequences described in this specification shall be used to remain compatible with current and future ATAPI Devices. 2.3. Status Register Utilization for Packet Commands See 3.6 ATAPI Register Map (Packet Command) on page 19 for a description of the register definition. 2.4.
ATAPI For Streaming Tape QIC-157 Rev B Table 2-1 Byte Count Register Usage Operation Send Command Packet Usage (PIO) Is used as a parameter to the Packet Command and is not used to control the Packet transfer. Parameters to the Packet As a parameter to any Packet Command Command (Task File Contents) that will transfer ata, the Byte Count is used by the Host to communicate the maximum / preferred amount of data to be transferred on each DRQ.
ATAPI For Streaming Tape QIC-157 Rev B upon receipt of any new ATAPI command. (See 2.15 ATAPI Command Protocol and DSC Handling , page 5.) 3. If a command is executing when the Device is issued a SRST, the DSC bit shall be cleared with the rest of the Status Register. The Host must issue ATAPI Identify or any packet command to restore DSC operation. 2.7. Flow of Packet Command, PIO Data In to the Host This class includes commands such as INQUIRY, READ etc.
ATAPI For Streaming Tape QIC-157 Rev B 2.8. Flow of Packet Command with PIO Data Out from the Host This class includes commands such as Mode Select, Write etc. Execution includes the transfer of some known number of data bytes from the Host to the Device. 1. The Host Polls for BSY=0, DRQ=0 then initializes the task file by writing the required parameters to the Features, Byte Count, and Drive/Head registers. 2. The Host writes the Packet Command code (A0h) to the Command Register. 3.
ATAPI For Streaming Tape QIC-157 Rev B 2. The Host writes the Packet Command code (A0h) to the Command Register. 3. The Device sets BSY and prepares for Command Packet transfer. 4. When the Device is ready to accept the Command Packet, the Device sets CoD and clears IO, BSY prior to asserting DRQ. Some Devices will assert INTRQ following the assertion of DRQ. See section 4.1.7.1 General Configuration Word (0), on page 25 for command packet DRQ types and other related timing information. 5.
ATAPI For Streaming Tape QIC-157 Rev B 2.11.
ATAPI For Streaming Tape QIC-157 Rev B 2.12. Timing of Data and Status Transfer Read Status Rd/Wr Data Data Transfer Completion Status BSY I/O CoD Byte Count 5µs Maximum DRQ INTRQ Flow 2.13. Control Signal Timing Requirements and Relationships The order that the signals change shall adhere to the following conditions: 1. Upon receiving the A0h ATAPI Packet Command the Device shall have BSY asserted until the next Host access of the Status Register where the Device can guarantee that CoD=1 and IO=0.
ATAPI For Streaming Tape QIC-157 Rev B the Device asserts INTRQ before testing DRQ following the transfer of the last data word in a command or data packet. See section 4.1.7.1 General Configuration Word (0), on page 25 for additional DRQ and other timing related information. 2.14. BIOS and ATAPI Driver Compatibility This section discusses the IDE features and functions that shall be provided by the ATA Drive to allow the BIOS and Driver to be content. 2.14.1.
ATAPI For Streaming Tape QIC-157 Rev B present, the ATAPI Driver must issue the ATAPI Device an ATAPI command, re-enabling DRDY, before it can issue an ATA Power management command. Operating systems wishing to use a common ATA power management Driver must also be changed to perform this detection and recovery sequence, if they intend to power-manage ATAPI Devices. 2.14.3.
ATAPI For Streaming Tape QIC-157 Rev B Implementor's Note: Implementors of ATAPI drivers which are intended to share a single cable with a disk and disk driver should ensure that the device has completed any issued commands prior to changing the DRV bit. 2.14.5. Default Timing ATAPI Devices compatible with this specification shall support ATA mode 3 timing without requiring the Host system to configure the ATAPI Device using any set features commands.
ATAPI For Streaming Tape QIC-157 Rev B 3. ATAPI Transport Mechanism The Transport Mechanism provides for the hardware support to connect the Host Computer to the Peripheral. There will ultimately be two “Models” of operation specified, the Compatibility and Extended Capability Models. The Compatibility Model will look exactly like an ATA/IDE Drive to all existing Drivers, Operating Systems and Hardware. It will operate under many restrictions and will be required to support extra capabilities.
ATAPI For Streaming Tape QIC-157 Rev B 3.2. ATAPI Soft Reset Command and Protocol ATA specifies a mandatory software reset capability because it provides a recovery mechanism from a class of errors/problems that are recoverable in no other way. The current Drivers invoke this feature at some point in their error recovery procedures today.
ATAPI For Streaming Tape QIC-157 Rev B 1. Host Sets and then clears SRST. 2. Master Device sets Busy, clears DASP & PDIAG and waits up to 3ms for Slave to assert DASP. 3. Slave Device also sets Busy, clears DASP & PDIAG and within 1ms asserts DASP. 4. Master Device waits up to 31s for PDIAG to be asserted. 5. Slave Device deasserts Busy and asserts PDIAG within 30s. 6. Master Device clears Busy. 7. Slave Device deasserts DASP after next command or after 31s. 3.4.
ATAPI For Streaming Tape QIC-157 Rev B 3.6.
ATAPI For Streaming Tape QIC-157 Rev B D7 BSY D6 DRDY D5 Reserved D4 DSC D3 DRQ D2 CORR D1 IDX D0 CHECK Read Figure 3-1 ATAPI Status Register (ATA Status Register) DRDY, DSC, CORR and CHECK shall be valid at Completion Status of the command. Bit 7 BSY Busy is set whenever the Device has access to the Command Block. Bit 6 DRDY Indicates the Device is capable of responding to an ATA command. Bit 5 Reserved Bit 4 DSC Cleared during the actual execution of Media Access commands.
ATAPI For Streaming Tape QIC-157 Rev B Bit 6,5,4 Reserved Reserved for Tag Type. Bit 3,2,1 Reserved Reserved for future enhancement. Bit 0 DMA (Optional) Any data for the Command shall be transferred via the DMA interface. Note this does not apply for the Command Packet. D7 D6 D5 D4 D3 Byte Count (Bits 0-7) Byte Count (Bits (8-15) D2 D1 D0 R/W R/W Figure 3-4 ATAPI Byte Count Register (ATA Cylinder High/Low Register) The Byte Count is used for PIO only; it is ignored for DMA operations.
ATAPI For Streaming Tape QIC-157 Rev B D7 1 D6 Reserved D5 1 D4 DRV D3 D2 D1 SAM LUN D0 R/W Figure 3-6 ATAPI Drive Select Register (ATA Drive / Head Select Register) Bit 3-0 SAM LUN This field replaces the SCSI LUN within the CDB. This field shall be set to zero. Bit 4 DRV This bit selects either Device 0 (DRV=0) or 1 (DRV=1).
ATAPI For Streaming Tape QIC-157 Rev B 4. Streaming Tape (Task File) Commands 4.1. ATA (Task File) Command Implementation Requirements This section details the Commands that the Device shall support from the ATA Standard definition of the commands. All ATAPI commands other than “A0” packet command shall use ATA command protocol as defined in the ATA Standard. 4.1.1. ATAPI Soft Reset See 3.2 ATAPI Soft Reset Command and Protocol on page 17. 4.1.2. Check Power Mode This command checks the power mode.
ATAPI For Streaming Tape QIC-157 Rev B 4.1.7. ATAPI Identify Device The ATAPI IDENTIFY DEVICE command enables the Host to receive parameter information from the Device. The parameter words in the buffer have the arrangement and meaning defined in the table below. All reserved bits or words shall be zero.
ATAPI For Streaming Tape QIC-157 Rev B The ATAPI Identify Device command shall not delay the transfer of the Identify Device data by more than 200 ms after receipt of the command. When the command is issued, the device sets BSY, sets up parameter information in the data buffer, and then sets DRQ and INTRQ. Implementor's Note: All ASCII fields will be byte swapped to maintain compatibility with ATA. For example, “This Example” would be written as “hTsiE axpmel”. 4.1.7.1.
ATAPI For Streaming Tape QIC-157 Rev B Bits 1-0 Command Packet Size This field indicates the size of the command packets used by this Device. 00b = 12 bytes (ALL Streaming Tape) 01b = 16 bytes (Reserved for future Devices) 1Xb = Reserved for future use. 4.1.7.2. Serial Number (Words 10 - 19) This optional field shall contain the Device’s serial number formatted as right-justified ASCII, padded with spaces (20h). If the field is not supported then it shall be filled with spaces. 4.1.7.3.
ATAPI For Streaming Tape QIC-157 Rev B Bit 10 IORDY can be disabled Is used to indicate a Device’s ability to enable or disable the use of IORDY. If this bit is set to one, then the Device supports the disabling of IORDY. Bit 11 IORDY Supported This is used to help determine whether a Device supports IORDY. If this bit is set to one, then the Device supports IORDY operation. If this bit is zero then the Device may support IORDY (this ensures backward compatibility.
ATAPI For Streaming Tape QIC-157 Rev B be set in this field by the Device to indicate which Advanced PIO Modes that it is capable of supporting. Of these bits, bits 7 through 1 are reserved for future advanced PIO modes. Bit 0, if set, indicates that the Device supports PIO Mode 3. 4.1.7.14. Minimum Multi-word DMA Transfer Cycle Time per Word (Word 65) Word 65 of the parameter information of the IDENTIFY DEVICE command is defined as the Minimum Multi-word DMA Transfer Cycle Time Per Word.
ATAPI For Streaming Tape QIC-157 Rev B Any Device that supports PIO Mode 3 or above shall support this field, and the value in word 68 shall not be less than 180. If the Device does not support this field, the Device shall return a value of zero in this field. 4.1.8. Set Features The Set Features command is used to set some interface timing and protocol modes. These modes are set at initialization by many BIOSes. The content of the ATAPI Features Register indicates the function to be performed.
ATAPI For Streaming Tape QIC-157 Rev B Table 4-6 Feature Number Description for Set Feature Command Feature Number 03h Data Transfer Mode.
ATAPI For Streaming Tape QIC-157 Rev B 5. Streaming Tape Device Model Streaming Tape Devices optimize their use in storing or retrieving user data sequentially. Since access is sequential over a long medium, position changes typically take a long time, when compared to direct-access Devices with a short medium. The recording medium is tape cartridges or cassettes of various lengths of a flexible substrate coated with a semi-permanent magnetic material.
ATAPI For Streaming Tape QIC-157 Rev B Some multi-track Devices have only one track group, using a parallel storage format that supports the simultaneous recording of all available tracks. The serpentine and parallel recording formats define tracks as longitudinal patterns of recorded information. For most recording formats, an area at beginning-of-medium contains a format identification as a tone burst or some other recognizable pattern. User data is not recorded in this area.
ATAPI For Streaming Tape QIC-157 Rev B Implementation of QFA allows the Host to partition a tape into two partitions. Note that the default configuration for a tape is a single partition. Devices supporting QFA shall allocate the two partitions as follows: Partition Use 0 Data 1 Directory The partitions are created when the Host issues a Mode Select command using the Medium Partition Page.
ATAPI For Streaming Tape QIC-157 Rev B already retrieved the MODE data or determined the density and block size but shall not use this information in this case. 5.3. Logical Elements within a Partition The area between BOPx and EOPx on a typical recorded volume contains at least two types of Host accessible elements, data blocks and tape marks. These elements are controlled and transferred between the Host and the medium using READ, WRITE, and WRITE FILEMARK commands. 5.3.1.
ATAPI For Streaming Tape QIC-157 Rev B which the Host specifies the size of a logical block for transfer and not the method of recording physical blocks on the medium. However, for this specification, Devices only support either fixedlength physical or logical blocks of 512 or 1024 bytes. The length of a logical block is always described in bytes. The length of a physical block may or may not be recorded as an exact byte count, depending on the format but the data shall be in blocks of 512 or 1024 bytes.
ATAPI For Streaming Tape QIC-157 Rev B For some pre-formatted volumes, the identifiers are associated with physical blocks. In variable-block size implementations, the identifier can be associated with a physical block when the logical block and the physical block have a one-to-one relationship on the medium. Some formats may carry both physical and logical block identifiers recorded on the medium.
ATAPI For Streaming Tape QIC-157 Rev B commands are issued. When a READ command for a single data block has been successfully executed, the logical position is after the transferred data block. 5.7. Error Reporting If any of the following conditions occurs during the execution of a command, the Device shall return “Check Condition” status. The appropriate Sense Key and Additional Sense Code should be set.
ATAPI For Streaming Tape QIC-157 Rev B 6. Streaming Tape Packet Commands 6.1. Packet Command Implementation Requirements The first byte of all ATAPI Device Command Packets shall contain an operation code as defined in this Specification. ATAPI Devices shall implement all commands with mandatory operation codes. 6.1.1. Reserved Reserved bits, fields, bytes, and code values are set aside for future standardization.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-2 Typical Command Packet for Read or Write Operations Bit Byte 0 1 2 3 4 5 6 7 8 9 10 11 7 6 5 4 3 2 1 Operation Code Reserved 0 1 (BT) (MSB) Transfer Length (LSB) Reserved Reserved Reserved Reserved Reserved Reserved Reserved 6.2.1. Operation Code The operation code of the Command Packet has a group code field and a command code field. The three-bit group code field provides for eight groups of command codes.
ATAPI For Streaming Tape QIC-157 Rev B parameters, diagnostic parameters, etc.). A parameter length of zero indicates that no data shall be transferred. This condition shall not be considered as an error. 6.2.5. Allocation Length The Allocation Length Field specifies the maximum number of bytes that the Host computer has allocated for returned data. An allocation length of zero indicates that no data shall be transferred. This condition shall not be considered as an error.
ATAPI For Streaming Tape QIC-157 Rev B 6.5. Unit Attention Condition The ATAPI Device shall generate a unit attention whenever the Device has been reset by a hard reset condition, or by a power-on reset. The Device shall also generate a unit attention condition whenever one of the following events occurs: 1. A removable medium may have been changed; 2. The version or level of microcode has been changed; 3. The mode parameters in effect have been restored from non-volatile memory; 4.
ATAPI For Streaming Tape QIC-157 Rev B 6.8. ATAPI Packet Commands for Streaming Tape Devices Table 6-4 Packet Commands Supported by Streaming Tape Devices Command Description Opcode Type ERASE 19h INQUIRY 12h LOAD/UNLOAD 1Bh LOCATE 2Bh LOG SELECT 4Ch LOG SENSE 4Dh MODE SELECT 15h MODE SENSE 1Ah READ 08h READ POSITION 34h REQUEST SENSE 03h REWIND (Rezero Unit on CD-ROM) 01h SPACE 11h TEST UNIT READY 00h WRITE 0Ah WRITE FILEMARK 10h M = command implementation is mandatory.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.1. Erase Command The ERASE command causes part or all of the medium to be erased beginning at the current position. As used here, “erased” means either the medium shall be erased or a pattern shall be written on the medium that appears as a gap.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.2. INQUIRY Command The INQUIRY command requests that information regarding parameters of the Device be sent to the Host. An option allows the Host to request additional information about the Device.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-8 INQUIRY Data Format Bit Byte 0 1 2 3 4 5 6 7 8-15 16-31 32-35 36-55 56-95 7 6 5 4 3 2 1 0 Reserved (Peripheral Qualifier) Peripheral Device Type (01) RMB Reserved ISO Version ECMA Version ANSI Version (02) Reserved Reserved Reserved Response Data Format (02) (AENC) (TrmIOP) Additional Length (n-4) Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved (RelAdr) (WBus32) (WBus16) (Sync) (Linked) (CmdQue) (SftRe) Vend
ATAPI For Streaming Tape QIC-157 Rev B A Response Data Format value of 02h indicates that the data shall be in the format specified in this Specification. Other Response Data Format values are reserved. The Additional Length field shall specify the length in bytes of the parameters. If the allocation length of the Command Packet is too small to transfer all of the parameters, the additional length shall not be adjusted to reflect the truncation. ASCII data fields shall contain only graphic codes (i.e.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.3. LOAD UNLOAD Command The LOAD UNLOAD command requests that the Device enable or disable further media access operations. Media access commands are defined in Table 6-4 Packet Commands Supported by Streaming Tape Devices. This command may also be used to request a re-tension function. Prior to performing the load or unload operation, the Device shall ensure that all buffered data, and filemarks have been transferred to the medium.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-12 Load, EOT, and Retension Bit Combinations Load 0 0 0 0 1 1 1 1 EOT 0 0 1 1 0 0 1 1 Re-Ten 0 1 0 1 0 1 0 1 Meaning unload retension then unload at BOT unload at EOT retension then unload at EOT load load and retension “Check Condition” “Check Condition” Implementor's Note: Following a hard reset or a cartridge insertion, an implied or automatic load may be performed by the Device.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.4. LOCATE Command LOCATE command causes the Device to position to the specified block address in a specified partition. Upon completion, the logical position shall be before the specified location. Prior to performing the locate operation, the Device shall ensure that all buffered data, and filemarks have been transferred to the medium.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.5. LOG SELECT Command The LOG SELECT command provides a means to manage statistical information maintained by the Device about the Device. Devices that implement the LOG SELECT command shall also implement the LOG SENSE command. Structures as log parameters within log pages are defined as a way to manage the log data. The LOG SELECT command provides for sending zero or more log pages of data.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-18 Recommended Sense Key, ASC and ASCQ for LOG SELECT Errors Sense Key 02 02 05 05 05 05 05 05 06 06 06 ASC 04 3A 1A 20 24 26 26 26 28 29 2A ASCQ 00 00 00 00 00 00 01 02 00 00 01 Description of Error NOT READY, CAUSE NOT REPORTABLE MEDIUM NOT PRESENT PARAMETER LIST LENGTH ERROR INVALID COMMAND OPERATION CODE INVALID FIELD IN COMMAND PACKET INVALID FIELD IN PARAMETER LIST PARAMETER NOT SUPPORTED PARAMETER VALUE INVALID NOT READY TO READY TRANSITION POWER ON,
ATAPI For Streaming Tape QIC-157 Rev B 6.8.6. LOG SENSE Command The LOG SENSE command provides a means to retrieve statistical information maintained by the Device about the Device. It is a complementary command to the LOG SELECT command.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-20 Recommended Sense Key, ASC and ASCQ for LOG SENSE Errors Sense Key 02 02 04 05 05 06 06 06 ASC 04 3A 15 20 24 28 29 2A ASCQ 00 00 00 00 00 00 00 01 Description of Error NOT READY, CAUSE NOT REPORTABLE MEDIUM NOT PRESENT RANDOM POSITIONING ERROR INVALID COMMAND OPERATION CODE INVALID FIELD IN COMMAND PACKET NOT READY TO READY TRANSITION POWER ON, RESET, OR ATAPI SOFT RESET OCCURRED MODE PARAMETERS CHANGED 53
ATAPI For Streaming Tape QIC-157 Rev B 6.8.6.12.Log Parameters This section defines the descriptors and pages for log parameters that may be used with Devices. The log page codes for Devices are defined in Table 6-21. Table 6-21 Log Page Codes Page Code 00h 01h 02h 03h 04h - 30h 31h 32h - 3Eh 3Fh Description Supported Log Pages Reserved Error Counter Page (Write) Page Error Counter Page (Read) Page Reserved Tape Capacity Page Vendor Specific Reserved Reference 6.8.6.29 on page 55 6.8.6.38 on page 56 6.8.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-23 Log Parameter Bit Byte 0 1 2 3 4 n 7 6 5 4 (MSB) 3 2 1 0 Parameter Code 0 (DU) 1 (DS) 0 (TSD) 0 (ETC) 00 (TMC) Parameter Length (n-3) Parameter Value Reserved (LSB) 0 (LP) Each log parameter begins with a four-byte parameter header followed by one or more bytes of Parameter Value data. [Editor's Note: Due to hardware restrictions all parameter values should be padded to a multiple of 4.
ATAPI For Streaming Tape QIC-157 Rev B The page length field specifies the length in bytes of the following supported page list, The supported page list field shall contain a list of all log page codes implemented by the Device in ascending order beginning with page code 00h. 6.8.6.38.Error Counter Pages Codes 02, 03 This section defines the optional error counter pages for write errors (page code 02h), and read errors (page code 03h). Table 6-23 defines the page format for these pages.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.6.38.2.Error Counter Page (Write) This section defines the parameter codes for the Error Counter Page (Write), page code 02h). Table 627 defines the counters and their use. The following techniques can be used to correct errors detected when writing to tape. 1. Rewrites. If a bad block is detected during the read after write operation, the block will be rewritten until it reads correctly or until the maximum rewrite count is reached.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.6.39.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.7. MODE SELECT Command The MODE SELECT command provides a means to specify medium or Device parameters. Devices that implement the MODE SELECT command shall also implement the MODE SENSE command. MODE SENSE should be issued prior to MODE SELECT to determine supported pages, page lengths, and other parameters.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-30 Recommended Sense Key, ASC and ASCQ for MODE SELECT Errors Sense Key 02 05 05 05 05 05 05 06 06 ASC 04 1A 20 24 26 26 26 28 29 ASCQ 00 00 00 00 00 01 02 00 00 Description of Error NOT READY, CAUSE NOT REPORTABLE PARAMETER LIST LENGTH ERROR INVALID COMMAND OPERATION CODE INVALID FIELD IN COMMAND PACKET INVALID FIELD IN PARAMETER LIST PARAMETER NOT SUPPORTED PARAMETER VALUE INVALID NOT READY TO READY TRANSITION POWER ON, RESET, OR ATAPI SOFT RESET OCCURRED
ATAPI For Streaming Tape QIC-157 Rev B 6.8.8. MODE SENSE Command The MODE SENSE command provides a means for a Device to report parameters. It is a complementary command to the MODE SELECT command.
ATAPI For Streaming Tape QIC-157 Rev B SENSE request of 3Fh in the page code field. The Sense Key shall be set to ILLEGAL REQUEST and the Additional Sense Code shall be set to INVALID FIELD IN COMMAND PACKET. This limitation ensures compatibility with the SCSI standard. 6.8.8.9. Current Values A PC field value of 0h requests the Device to return the current parameter values for the specified page code. The current values returned are: 1. The parameters set in the last successful MODE SELECT command. 2.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.8.13. Mode Parameters This section describes the block descriptors and the pages used with MODE SELECT and MODE SENSE commands that are applicable to Devices.
ATAPI For Streaming Tape QIC-157 Rev B any, that may follow the last block descriptor. A block descriptor length of zero indicates that no block descriptors are included in the mode parameter list. This condition shall not be considered an error. Table 6-38 Mode Parameter Block Descriptor Bit Byte 0 1 2 3 4 5 6 7 7 6 5 4 3 2 1 0 Density Code (MSB) Number of Blocks (LSB) Reserved (MSB) Block Length (LSB) Block descriptors specify some of the medium characteristics.
ATAPI For Streaming Tape QIC-157 Rev B The Page Code field identifies the format and parameters defined for that mode page. Some page codes are defined as applying to all Device types and other page codes are defined for the specific Device type. When using the MODE SENSE command, if page code 00h (vendor-specific page) is implemented, the Device shall return that page last in response to a request to return all pages (page code 3Fh). When using the MODE SELECT command, this page should be sent last.
ATAPI For Streaming Tape QIC-157 Rev B a) report a medium-type value as described for item (2) if no preceding MODE SELECT command has been issued for the currently loaded cartridge. b) report a medium-type value as provided by the last successful MODE SELECT command for the currently loaded cartridge. 5. Following a successful unload operation, while not ready, the Device shall report the most recent medium-type code value as determined by items (2) through (4) above.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-40 ATAPI Streaming Tape Device Medium Type Codes Code 00h 01h 02h 03h 04h 05h 06h 07h 08h 09h 10h 11h 12h 13h 14h 15h 16h-1Fh IPS Default 90 90 90 90 120 120 120 120 120 90 90 120 120 120 120 120 Oe 3M Ref No. Form Length A B C D E F 310 310 550 550 550 550 550 550 550 550 550 550 550 550 550 900 DC300 DC300XLP DC615 DC600 DC6037 DC6150 DC6250 DC6320 DC6525 DC2000 DC2080 DC2110 DC2120 DC2165 QIC-EST Reserved 5.25" 5.25" 5.25" 5.25" 5.25" 5.25" 5.
ATAPI For Streaming Tape QIC-157 Rev B 82h 84h 85h 86h 87h-90h 91h 92h 93h 94h-95h 96h 97h-A0h A1h A2h-C2h C3h C4h-C5h C6h C7h-D2h D3h D4h-FFh 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 TDB 900 TDB 900 TBD 900 TBD 900 TDB 900 TDB 900 TBD 900 TBD 900 120 900 Reserved DC 3 GB Reserved Wide Tape Reserved Test BaFe DC2500 XL Reserved Wide Tape Reserved Firmware Reserved Reserved Wide Tape Reserved 3.5" 3.5" 3.5" 3.5" 3.5" 3.5" 3.5" 3.5" 3.5" 3.5" 3.5" 3.5" 3.5" 3.5" 3.5" 3.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-42 Key for 5.25" cartridges: Code A B C D E F G H I Meaning 2nd and 3rd EOT holes 1st and 2nd EOT holes early warning hole to 1st EOT hole load point hole to 3rd BOT hole 2nd BOT hole to 3rd BOT hole 1st BOT hole to 2nd BOT hole load point hole to 4th BOT hole 3rd BOT hole to 4th BOT hole octal hole pattern on cartridge Table 6-43 Key for 3.
ATAPI For Streaming Tape QIC-157 Rev B For the MODE SENSE command, the density code field reflects the current operating density of the Device. For some Devices, the default density code value returned in response to a MODE SENSE command may change dynamically to match the most recently selected density. The density code value returned in response to a MODE SENSE command shall be as described below: 1.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-46 ATAPI Streaming Tape Device Density Codes Code 00h 01h 02h 03h 04h 05h 06h 07h 08h 09h 0Ah 0Bh 0Ch 0Dh 0Eh 0Fh 10h 11h 12h 13h 14h 15h 16h - 1Bh 1Ch 1Dh 1Eh 1Fh 20h 21h 22h 23h 24h - 27h 28h 29h 2Ah - 7Eh tbd tbd tbd 7Fh 80h-91h 92h 93h 80h - FFh mm (Inch) Tracks bpmm bpi Default 12.7 (0.5) 9 32 (800) 12.7 (0.5) 9 63 (1600) 12.7 (0.5) 9 246 (6250) 6.3 (0.25) 4/9 315 (8000) 6.3 (0.25) 4/9 315 (8000) 12.7 (0.5) 9 126 (3200) 6.3 (0.25) 4 252 (6400) 3.81 (0.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-47 Key for Density Codes Code NRZI GCR PE MFM IMFM FMFM DDS RLL R C CS Meaning Non Return to Zero, change on ones Group Code Recording Phase Encoded Modified Frequency Modulation Inverted MFM Floppy compatible MFM DAT Data Storage Run Length Limited Reel-to-Reel Cartridge Cassette NOTES: 1. Serial Recorded. 2. Parallel Recorded. 3. Old format known as QIC-11. 4. See Appendix D for additional standards information. 5. Helical Scan 6.
ATAPI For Streaming Tape QIC-157 Rev B A Data Compression Enable (DCE) bit of one indicates that the data compression is to be enabled. When this bit is set, data sent to the Device by the Host shall be processed using the selected compression algorithm before being written to the medium. A DCE bit of zero indicates that data compression is disabled.
ATAPI For Streaming Tape QIC-157 Rev B data most recently encountered during a prior read operation. This is the case in the boundaries shown in Table 6-51.
ATAPI For Streaming Tape QIC-157 Rev B Implementor's Note: When compressed data is encountered on the medium that the Device cannot decompress, the Device should treat the data as uncompressed. In the sense data, the Valid bit, the ILI bit, and the Information field should be set accordingly. A RED field of 3 is undefined and shall result in a “Check Condition” status with the Sense Key set to ILLEGAL REQUEST.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-53 Compression Algorithm Identifier Algorithm Identifier 00h 01h 02h - 0Fh 10h 11h - 1Fh 20h 21h - FDh FEh FFh 100h - FFFFFFFFh Description No Algorithm Selected (Identifies uncompressed data) Unused Not assigned IBM IDRC Data Compaction Algorithm Not assigned DCLZ Data Compaction Algorithm Not assigned Reserved Unregistered Algorithm Reserved 6.8.8.64.
ATAPI For Streaming Tape QIC-157 Rev B The Medium Format Recognition field is a Device-defined value indicating the Device's capability to automatically identify the medium format and partition information when reading an unknown volume. Table 6-55 Medium Format Recognition Field Value 00h 01h 02h 03h 04h-FFh Meaning Incapable of format or partition recognition. Capable of format recognition only. Capable of partition recognition only. Capable of format and partition recognition. Reserved.
ATAPI For Streaming Tape QIC-157 Rev B If the PREVENT bit is set, the Device defaults in the Prevent state after power up. If the LOCKED bit is set, the volume is locked. If the LOCK bit is set, the Device supports locking the volume using the ALLOW/PREVENT MEDIUM REMOVAL command. If the SLOWB bit is set, the Device restricts the byte count for PIO transfers for slow buffer memory. If the BLK1024 bit is set, the Device supports 1024 byte block size.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.9. READ Command The READ command requests that the Device transfer one or more block(s) of data to the Host beginning with the current block.
ATAPI For Streaming Tape QIC-157 Rev B sense data. If end-of-data is encountered at or after early-warning, the EOM bit shall also be set to one. Upon termination, the logical position shall be after the last recorded logical block (end-ofpartition side). The Information field shall be set to the difference (residue) of the requested Transfer Length minus the actual number of blocks read.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.10. READ POSITION Command The READ POSITION command reports the current logical position of the Device. No medium movement shall occur as a result of the command.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-60 Read Position Data Format Bit Byte 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 6 BOP EOP 5 4 3 Reserved Partition Number Reserved Reserved 2 BPU 1 0 Reserved (MSB) First Block Location (LSB) (MSB) Last Block Location (Optional) (LSB) Reserved (MSB) Blocks in Buffer (Optional) (LSB) (MSB) Bytes in Buffer (Optional) (LSB) A Beginning Of Partition (BOP) bit of one indicates that the Device is at the beginning-of-partition in the current pa
ATAPI For Streaming Tape QIC-157 Rev B write operation, this field indicates the block number of blocks not written to the medium. Whereas, as an ATAPI extension to the SCSI standard, during a read operation this field indicates the number of blocks read ahead in the buffer. The Bytes in Buffer field indicate the number of bytes in the Device buffer.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.11. REQUEST SENSE Command The REQUEST SENSE command requests that the Device transfer sense data to the Host. Table 6-62 Request Sense Command Bit Byte 0 1 2 3 4 5 6 7 8 9 10 11 7 6 5 4 3 2 1 0 Operation code (03h) Reserved Reserved Reserved Allocation Length Reserved Reserved Reserved Reserved Reserved Reserved Reserved The sense data: 1. shall be available if an error condition (“Check Condition”) had previously been reported to the Host; 2.
ATAPI For Streaming Tape QIC-157 Rev B implementation of error code 71h is optional. Error code values of 00h to 6Fh are not defined by this Specification and their use is not recommended.
ATAPI For Streaming Tape QIC-157 Rev B The Sense Key field is mandatory and indicates generic information describing an error or exception condition. The sense keys are defined in Table 6-66 Sense Key Descriptions on page 89. The content of the Information field is command-specific and is defined within the appropriate section for the command of interest. Devices shall implement the Information field.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-64 Field Pointer Bytes Bit Byte 15 16 17 7 SKSV (MSB) 6 5 C/D Reserved 4 3 2 Reserved BPV Field Pointer 1 0 Bit Pointer (LSB) A Command Data (C/D) bit of one indicates that the illegal parameter is in the Command Packet. A C/D bit of zero indicates that the illegal parameter is in the data parameters sent by the Host. A Bit Pointer Valid (BPV) bit of zero indicates that the value in the Bit Pointer field is not valid.
ATAPI For Streaming Tape QIC-157 Rev B cleared in the Status Register to free the bus. The actual Completion Status is unknown until the DSC bit in the Register Status is set. This delayed status is not a deferred error. The deferred error may be indicated by returning “Check Condition” status to the Host as described below. The subsequent execution of a REQUEST SENSE command shall return the deferred error sense information.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.11.27. Sense-key and Sense Code Definitions Table 6-66 Sense Key Descriptions Sense key 0h 1h 2h 3h 4h 5h 6h 7h 8h 9h - Ah Bh Dh Eh - Fh Description NO SENSE. Indicates that there is no specific Sense Key information to be reported. This would be the case for a successful command. RECOVERED ERROR. Indicates that the last command completed successfully with some recovery action performed by the Device.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-67 ASC and ASCQ Assignments ASC 00 00 00 00 00 03 03 03 04 04 04 04 04 08 08 09 0A 0C 11 11 11 11 11 11 11 14 14 14 14 14 15 15 15 17 17 17 17 18 19 1A 20 21 24 25 26 26 26 26 27 28 ASCQ 00 01 02 04 05 00 01 02 00 01 02 03 04 00 01 00 00 00 00 01 02 03 08 09 0A 00 01 02 03 04 00 01 02 00 01 02 03 00 00 00 00 00 00 00 00 01 02 03 00 00 Description NO ADDITIONAL SENSE INFORMATION FILEMARK DETECTED END-OF-PARTITION/MEDIUM DETECTED BEGINNING-OF-PARTITION/MEDIUM
ATAPI For Streaming Tape QIC-157 Rev B 2A 2A 2D 29 30 30 30 30 31 33 37 39 3A 3B 3B 3B 3B 3E 3F 3F 3F 40 44 46 4C 4E 50 50 50 51 52 53 53 53 5A 5A 5A 5A 5B 5B 5B 5B 70 71 80-FF 00 01 00 00 00 01 02 03 00 00 00 00 00 00 01 02 08 00 00 01 03 NN 00 00 00 00 00 01 02 00 00 00 01 02 00 01 02 03 00 01 02 03 NN 00 80-FF PARAMETERS CHANGED MODE PARAMETERS CHANGED OVERWRITE ERROR ON UPDATE IN PLACE POWER ON, RESET, OR ATAPI SOFT RESET OCCURRED INCOMPATIBLE MEDIUM INSTALLED CANNOT READ MEDIUM - UNKNOWN FORMAT CANNO
ATAPI For Streaming Tape QIC-157 Rev B Table 6-68 Recommended Sense Key, ASC and ASCQ for REQUEST SENSE Errors Sense Key 05 05 06 06 ASC 20 24 28 29 ASCQ 00 00 00 00 Description of Error INVALID COMMAND OPERATION CODE INVALID FIELD IN COMMAND PACKET NOT READY TO READY TRANSITION POWER ON, RESET OR ATAPI SOFT RESET OCCURRED 92
ATAPI For Streaming Tape QIC-157 Rev B 6.8.12. REWIND Command The REWIND command causes the Device to position to the beginning-of-partition in the current partition. Prior to performing the rewind operation, the Device shall ensure that all buffered data and filemarks have been transferred to the medium.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.13. SPACE Command The SPACE command is used to position to a relative filemark or to end of data depending on the Count and Code. Both forward and reverse filemark positioning are provided. If the Device does not support the reverse direction, then a SPACE command in the reverse direction shall be terminated with a “Check Condition” and the Sense Key shall be set to ILLEGAL REQUEST.
ATAPI For Streaming Tape QIC-157 Rev B If beginning-of-partition is encountered while spacing over filemarks in the reverse direction, “Check Condition” status and the Sense Key to NO SENSE shall be set. The EOM and Valid bits shall be set to one, and the Information field set to the total number of filemarks not spaced over (the requested number of filemarks minus the actual number of filemarks spaced over). When spacing to end-of-data, the count field is ignored.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.14. TEST UNIT READY Command The TEST UNIT READY command provides a means to check if the Device is ready. This is not a request for a self-test. If the Device would accept an appropriate medium-access command without returning “Check Condition” status, this command shall return a “Good” status.
ATAPI For Streaming Tape QIC-157 Rev B 6.8.15. WRITE Command The WRITE command requests that the Device write the data that is transferred from the Host starting at the current position.
ATAPI For Streaming Tape QIC-157 Rev B Table 6-77 Recommended Sense Key, ASC and ASCQ for WRITE Errors Sense Key 02 02 03 05 05 06 06 06 07 0D ASC 04 3A 0C 20 24 28 29 2A 27 00 ASCQ 00 00 00 00 00 00 00 01 00 02 Description of Error NOT READY, CAUSE NOT REPORTABLE MEDIUM NOT PRESENT MEDIUM ERROR:WRITE ERROR INVALID COMMAND OPERATION CODE INVALID FIELD IN COMMAND PACKET NOT READY TO READY TRANSITION POWER ON, RESET, OR ATAPI SOFT RESET OCCURRED MODE PARAMETERS CHANGED WRITE PROTECTED VOLUME OVERFLOW:END-
ATAPI For Streaming Tape QIC-157 Rev B 6.8.16. WRITE FILEMARK Command The WRITE FILEMARK command requests that the Device write a filemark to the current position. Table 6-78 Write Filemark Command Bit Byte 0 1 2 3 4 7 6 5 4 3 Operation code (10h) Reserved 0 0 0 5 6 7 8 9 10 11 2 1 0 0 (WSmk) 0 (Immed) Transfer Length Reserved Reserved Reserved Reserved Reserved Reserved Reserved The Device shall return status as soon as the command descriptor block has been validated.
ATAPI For Streaming Tape QIC-157 Rev B 6.9. Glossary for ATAPI Device Beginning-of-partition. The position at the beginning of the permissible recording region of a partition. If only one partition is defined, this position is typically equivalent to the beginning-ofmedium. beginning-of-medium. The extreme position along the medium in the direction away from the supply reel which can be accessed by the Device. early-warning.
ATAPI For Streaming Tape QIC-157 Rev B 6.10.
ATAPI For Streaming Tape QIC-157 Rev B JVC KODAK KONAN KONICA LAPINE LASERDRV LMS MATSHITA MAXTOR MELA MELCO MICROBTX MICROP MICROTEK MINSCRIB MOTOROLA NAI NatSemi NCL NCR NEC NKK NT OSI OPTIMEM OPTOTECH OTL PERTEC PFTI PRAIRIE PTI PRIAM QUALSTAR QUANTUM RICOH RODIME RTI SEAGATE SIEMENS SMS SONY SPERRY STK SUN SYSGEN T-MITTON TANDBERG TANDON TEAC TI-DSG TOSHIBA UNISYS USDC VERBATIM VRC WangDAT WANGTEK JVC Information Products Co.
ATAPI For Streaming Tape QIC-157 Rev B WDIGTL XEBEC Western Digital Xebec Corporation i ii 103