August 31, 1988 To: X3T9.2 Membership From: Dan Davies, Cipher Subj: Generic Read-Write Error Recovery Mode Parameters Page This document is the outgrowth of an action item to clarify the wording of the retry counts and algorithms in REQUEST SENSE and MODE SELECT/SENSE (the long dormant Gary Stephens action item that I inherited). After evaluating the mode parameters pages in each device section, it appeared that most (if not all) of the error recovery parameters could be applied to all device types. The proposal does not suggest that each device would support all parameter values associated with the page; however, it does not seem unreasonable to suggest that any device could report one of the possible values for any given parameter field. Given this background, not to mention the never-ending struggle to spare trees, I offer this proposal to combine the existing page 01h mode parameters pages into a common page for all device types to be included in Section 7 of Revision 6. Revision 1 of this document includes the changes recommended by the San Jose Working Group. These changes are indicated by underscore in the text of the proposal and are summarized below: (1) Reorder the paragraphs for the bit definitions so that the most significant bit in byte 2 is described first. (2) Enumerate the bits that affect the error recovery and reporting for the AWRE, ARRE, and RC bits. (3) Add wording to indicate that data shall not be fabricated when the RC bit is zero. (4) Change the wording of the read and write retry count fields to indicate that the count represents the number of times to perform the recovery algorithm. (5) Add wording to the data strobe offset field to indicate that the recovered data strobe, or equivalent, shall be adjusted. (6) Add wording to the recovery time limit field to state that the value of zero indicates that no time limit is specified. (7) Additional rewording in some paragraphs for clarity. 7._._. Read-Write Error Recovery Parameters Page Table 7-__: Read-Write Error Recovery Parameters ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 |Reserved|Reserved| Page Code (01h) | -----|-----------------------------------------------------------------------| 1 | Additional 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 parameters page (Table 7._) specifies the error recovery and reporting parameters that the target shall use when transferring data between the initiator and the medium. These parameters only apply to read-write errors and do not affect message system retries or positioning error recovery procedures. An automatic write reallocation enabled (AWRE) bit of one indicates that the target shall enable automatic reallocation of defective data blocks during write operations. An AWRE bit of zero specifies 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. An ARRE bit of zero specifies that the target shall not perform automatic reallocation of defective data blocks during read operations. Automatic read and write reallocation, if supported, is performed at the discretion of the target in a manner similar to the REASSIGN BLOCKS command (see 8._._). All error recovery and reporting actions specified by the TB, RC, EER, PER, DTE, and DCR bits shall be executed. Data is placed in the reallocated block if the data could be recovered within the limits established by the error recovery parameters. Error reporting as required by the error recovery parameters shall be performed only after completion of the reassignment. The reassignment process shall report any failures that occur during the reassignment process. See the REASSIGN BLOCKS command for error procedures. A transfer block (TB) bit of one indicates that a data block that is not recoverable within the specified recovery limits shall be transferred to the initiator before CHECK CONDITION status is returned. A TB bit of zero indicates that the unrecoverable data block shall not be transferred to the initiator. Data blocks that can be recovered within the recovery limits are always transferred, regardless of the value of the TB bit. [Some unrecoverable read-write errors have no data to transfer. Does TB set to one require the target to fabricate data to satisfy the block length? Should this depend upon the value of the RC bit? (i.e., If the RC bit is one, the target should fabricate data to satisfy the block length.) DMD] A read continuous (RC) bit of one indicates that the target shall transfer the entire requested length of data without adding delays to perform error recovery. 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 the EER, PER, DTE, and DCR bits within this byte. A RC bit of zero indicates that target shall use the specified error recovery and reporting parameters when an error occurs during the requested data transfer. Data shall not be fabricated when the RC bit is set to zero. Implementors note: This bit set to one is typically used in image processing, audio, or video applications where uninterrupted data flow is more important than error-free data. An enable early recovery (EER) bit of one indicates that the target shall use the most expedient error recovery algorithm (e.g., attempt error correction prior to read-write retries). An EER bit of zero indicates that the target shall use the most deliberate read-write error recovery algorithm, within the limits established by the other error recovery parameters (e.g., attempt to recover the block error-free prior to using error correction). [I have removed the requirement for an ILLEGAL REQUEST response if the DCR and EER bits are both set to one. For some conditions, error correction may not be the most expedient error recovery algorithm. DMD] A post error (PER) bit of one indicates that the target shall return CHECK CONDITION status to report recovered errors. A PER bit of zero indicates that the target shall not report errors recovered within the limits established by the error recovery parameters. If this bit is zero, the DTE bit must also be set to zero. A disable transfer on error (DTE) bit of one indicates that the target shall terminate the data transfer after a recovered read-write error occurs. All data from the recovered block shall be transferred prior to terminating the read-write operation. A DTE bit of zero indicates that the target shall not terminate the transfer for errors recovered within the limits established by the read-write error recovery parameters. A disable correction (DCR) bit of one indicates that the target shall not use error correction codes during error recovery. A DCR bit of zero allows the use of error correction codes for error recovery. [The tables describing error recovery and reporting bit definitions have been deleted. Since the Colorado Springs plenary agreed that restrictions on implementation of the EER bit should be removed, much of the table is obsolete and the rest becomes redundant. The August Working Group suggests that these tables could remain in device specific sections, if deemed helpful. DMD] The read retry count specifies the number of times that the target should attempt its recovery algorithm during a read operation before an unrecoverable error is reported. A read retry count of zero indicates that the target shall not use its recovery algorithm during read operations. [There was a suggestion at the August Working Group to allow the value FFh to indicate that the count is not specified. If this approach is adopted, it might be more consistent to let zero mean "not specified" and let FFh indicate "disable recovery algorithm" DMD] The correction span field specifies the size, in bits, of the largest burst data error for which data error correction may be attempted. A value of zero indicates that no correction span is specified. The head offset count field specifies, in two's-complement notation, an incremental position to which the head(s) shall be offset from the nominal setting. The effect of this field on write operations is unspecified. A positive value indicates moving the head(s) in a positive direction as specified by the target. A negative value indicates moving the head(s) in a negative direction as specified by the target. Any value specified in the head offset count 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. A value of zero indicates that no offset is specified. The Data Strobe Offset Count field specifies, in two's-complement notation, an incremental position to which the recovered data strobe, or its equivalent, shall be adjusted from the nominal setting. The effect of this field on write operations is unspecified. 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. A value of zero indicates that no data strobe offset is specified. The target shall return CHECK CONDITION status and shall set the sense key to ILLEGAL REQUEST if an unsupported head or data strobe offset count is specified. The valid bit shall be set to one and the information bytes shall be set to the positive value of the maximum offset count that is supported. The target shall set the valid bit to zero if it cannot determine the maximum offset count supported. [Why not allow rounding for the offset count fields? DMD] IMPLEMENTORS NOTE: If the head offset or data strobe offset count field is implemented, it is recommended that the target support an equal number of positive and negative offset counts. The number of valid values and the degree of offset for each incremental count is device specific. The write retry count specifies the number of times that the target should attempt its recovery algorithm during a write operation before an unrecoverable error is reported. A write retry count of zero indicates that the target shall not use its recovery algorithm during write operations. [There was a suggestion at the August Working Group to allow the value FFh to indicate that the count is not specified. If this approach is adopted, it might be more consistent to let zero mean "not specified" and let FFh indicate "disable recovery algorithm" DMD] 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 for any individual logical block. The target may round this value as described in section 6.5.4. If both retry count and recovery time limit are specified, the field that requires the least amount of time for data error recovery shall have priority. A value of zero indicates that no recovery time limit is specified.