Availability:
     Level 2    , 'Y'
     Level 7    , 'Y'
     Level A    , 'Y'
     Level F    , 'Y'

  Quick Help:
     Set Retries - DERP, Y[Mode],[MaxRdRetries],[MaxWrtRetries],[OtcTLevel],[Options]

  Description:
    This command allows the user to specify the error recovery parameters that will be used
    for subsequent diagnostic commands.  (This version of the Set Retries command is only
    available if the drive supports DERP!  To know whether your drive supports DERP, issue
    the Online "^L" command to see a list of features supported by the drive.)

  Input Parameters:

    0 - Error Recovery Mode.
    
        This parameter specifies the error recovery mode to be used.  The following
        error recovery modes are available:

           0 = Maximum Normal
           1 = Maximum Full
           2 = Default Normal
           3 = Default Full
           4 = Minimum Normal
           5 = Minimum Full
           6 = Simple Retries
           7 = Mini-Cert / Data Scrub

        The Maximum Error Recovery Modes (0 and 1) are typically used for system
        information recovery.
        
        The Default Error Recovery Modes (2 and 3) are typically used by the native
        interface.
        
        The Minimum Error Recovery Modes (4 and 5) are typically used for diagnostic
        and media certification operations.
        
        The Normal Error Recovery Modes (0, 2 and 4) should be used for multiple sector
        transfers.  The retry steps for these modes employ less extreme tweaks to recover
        the data.  This increases the chance of successfully reading subsequent sectors
        without resetting tweaks.
        
        The Full Error Recovery Modes (1, 3 and 5) should be used for single sector
        transfers.  The retry steps for these modes employ more extreme tweaks to
        recover the data.  The tweaks used by these modes would make it difficult to
        read subsequent sectors without error.
        
        The Simple Error Recovery Mode (6) is a "Normal" type error recovery mode but with
        no additional options enabled.  Essentially, this is free retries applied during
        DERP Reads.
        
        The Mini-Cert / Data Scrub Recovery Mode (7) is used during the reallocation
        operation to perform defect verification of the target block, typically performing
        a reduced set of read or write retries.
        
        Error Recovery Mode 2 (Default Normal) is the default configuration used by the
        native interface (aka, "Interface Level Retries")
    
        TIP: Setting the Error Recovery Mode without setting any other parameters will
        restore the default settings for the specified Error Recovery Mode.
    
          Type:    Unsigned 8-bit value
    
          Range:   0 to 7
    
          Default: If this parameter is not entered, the current error recovery mode
                   will not be changed.
    
    1 - Maximum read retry count allowed.
    
        If entered, this parameter specifies the maximum allowed read retry count.  NOTE:
        Specifying this parameter will cause the corresponding Error Recovery Options bit
        to be set that enables the use of this value.
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to 0xFFFF
    
          Default: If this parameter is not entered, the maximum allowed read retry count
                   for the specified error recovery mode will not be changed.
    
    2 - Maximum write retry count allowed.
    
        If entered, this parameter specifies the maximum allowed write retry count.  NOTE:
        Specifying this parameter will cause the corresponding Error Recovery Options bit
        to be set that enables the use of this value.
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to 0xFFFF
    
          Default: If this parameter is not entered, the maximum allowed write retry count
                   for the specified error recovery mode will not be changed.
    
    3 - On-the-fly Correction ECC T-Level.
    
        If entered, this parameter specifies the ECC T-Level to be used for on-the-fly
        correction.  Although any value from 0x00 to 0xFF may be entered, the diagnostic
        will automatically round down to the nearest available value from the entered
        value.  NOTE: Specifying this parameter will cause the corresponding Error Recovery
        Options bit to be set that enables the use of this value.
    
          Type:    Unsigned 8-bit value
    
          Range:   0 to 0xFF
    
          Default: If this parameter is not entered, the on-the-fly correction ECC T-Level
                   for the specified error recovery mode will not be changed.
    
    4 - Error Recovery Options.
    
        If entered, this parameter specifies the options that are allowed to be set for
        the Error Recovery system.  The definition of each bit is specified below:
    

        
        Bit 0: Enable maximum OTF ECC correction.
        
               If set, maximum on-the-fly ECC correction will be applied.
        
        Bit 1: Apply only minimum ECC correction.
        
               If set, only minimum on-the-fly ECC correction will be applied.
        
        Bit 2: Enable transfer of uncorrectable data block.
        
               If set, uncorrectable sectors will be transfered from the Correction
               Buffer to the Read Buffer.
        
        Bit 3: Enable restricted servo flaws coast - read.
        
               If set, restrict servo flaw coasting during a read only if one of the
               following conditions applies:
        
                 1) The failed block is not associated with a known grown servo flaw
                 2) New servo flaws are detected on the target track
                 3) Forced servo coast tweaks
        
        Bit 4: Enable restricted servo flaws coast - write.
        
               If set, restrict servo flaw coasting during a write only if one of the
               following conditions applies:
        
                 1) The failed block is not associated with a known grown servo flaw
                 2) New servo flaws are detected on the target track
                 3) Forced servo coast tweaks
        
        Bit 5: Enable early error recovery exit.
        
               If set, error recovery will terminate when the retry step is equal
               to the early exit retry step.
        
        Bit 6: Disable normal retry tweak steps.
        
               If set, all retry tweak steps will be disabled for normal error recovery
               modes.
        
        Bit 7: Disable full-hidden retry tweak steps.
        
               If set, the hidden retry steps will be disabled for the full error
               recovery modes.  The first 9 steps of the full error recovery modes
               are defined as hidden retries.
        
        Bit 8: Disable full retry tweak steps.
        
               If set, all retry steps will be disabled for the full error recovery
               modes.
        
        Bit 9: Disable undo of retry tweaks.
        
               If set, the retry tweaks will not be undone after the retry completes.
        
        Bit 10: Disable on-the-fly ECC correction - initial access.
        
                If set, on-the-fly ECC correction will be disabled for the initial
                attempt to access a sector.
        
        Bit 11: Disable on-the-fly ECC correction - normal retry tweak steps.
        
                If set, on-the-fly ECC correction will be disabled for the normal
                error recovery modes for all retry steps.
        
        Bit 12: Disable on-the-fly ECC correction - full-hidden retry tweak steps.
        
                If set, on-the-fly ECC correction will be disabled for the full
                error recovery modes for all hidden retry steps.  The first 9
                steps of the full error recovery modes are defined as hidden retries.
        
        Bit 13: Disable on-the-fly ECC correction - full retry tweak steps.
        
                If set, on-the-fly ECC correction will be disabled for the full
                error recovery modes for all retry steps following the hidden
                retries.  The first 9 retry steps of the full error recovery modes
                are defined as hidden retries.
        
        Bit 14: Enable selected ER retry step.
        
                If this bit is set and Mode Options Bit 15 is also set, a specified
                error recovery step will be used for the initial sector access.
        
        Bit 15: Skip initial read/write access of request.
        
                Typically, the initial access of a sector is performed without error
                recovery.  If this bit is set, the initial sector access will be
                performed using error recovery.  If Mode Options Bit 14 is also set,
                a specified error recovery step will be used for the initial sector
                access.  If Mode Options Bit 14 is cleared, the first error recovery
                step will be used for the initial sector access.
        
        Bit 16: Enable ECC selection setting - normal retries only.
        
                If set, a specified ECC T-Level will be used for on-the-fly correction
                only during NORMAL retries.  (This bit is a "don't care" if Bit 23 is
                set.)
        
        Bit 17: Disable retry on track integrity error.
        
                If set, retries will be disabled on track integrity errors.
        
        Bit 19: Disable PFast.
        
                If set, P-Fast will be disabled during preamp fast tweaks.
        
        Bit 20: Enable use of selected maximum read retry count.
        
                If set, only a specified number of read retries will be allowed when
                read retries are required.
        
        Bit 21: Enable use of selected maximum write retry count.
        
                If set, only a specified number of write retries will be allowed when
                write retries are required.
        
        Bit 22: Enable selected maximum retry counts in non-User media partition.
        
                If set, the maximum read and write retry counts that have been enabled
                by Bits 20 and 21 will be applied to retries in non-user partitions.
        
        Bit 23: Enable ECC selection setting.
        
                If set, a specified ECC T-Level will be used for on-the-fly correction
                for all retry modes.  Setting this bit causes Bit 16 to be considered
                a "don't care."
        
        Bit 24: Disable the extended retries applied to Write Unsafe error.
        
                If set, the extended retries applied to Write Unsafe errors will be
                disabled.
        
        Bit 25: Enable reporting of recovered servo seek error to host.
        
                If set, recovered servo seek errors will be reported to the host.
        
        Bit 26: Enable Read/Write to complete transfers in RAW mode.
        
                If set and the Read-After-Write feature is enabled for the product,
                the Read/Write firmware is allowed to request that a transfer be
                completed in RAW mode.
        
        Bit 27: Enable abort during error recovery.
        
                If set, abort request will be honored during error recovery.
                Note that this bit only applies for single-block error
                recovery.  For non single-block error recovery, abort of
                error recovery is already allowed.
        
        Bit 28: Unused.
        
        Bit 29: Disable Servo Coast
        
                If set, the servo coast functionality of Error Recovery is
                disabled.  This bit allows for an abosulte assertion over
                servo coasting for reads and writes, fully disallowing
                coasting unlike the option bits 03 and 04.
        
        Bit 30: Enable Reduced Erasure correction.
        
                If set and the Reduced Erasure Correction feature is enabled for
                the product, the level of erasure correction applied during retries
                will be reduced.
        
        Bit 31: Unused.
        
        To Disable All Retries:
           Clear bit 18
           Set bits 6, 7, and 8
        
        To Disable OTF Correction:
           Set bits 10, 11, 12, and 13
        
          Type:    Unsigned 32-bit value
    
          Range:   0 to 0xFFFFFFFF
    
          Default: If this parameter is not entered, the Error Recovery Options for the
                   specified error recovery mode will not be changed.
    
  Output Data:


    If an error occurred, the following information will be displayed.
    
          "DiagError aaaaaaaa"
    
       where
    
          aaaaaaaa is the Diagnostic Error Code
    
    If no error occurred, the current Error Recovery configuration will be displayed
    as follows.
    
          "Error Recovery Info:
    
          " P0: Mode a (bbbbbb)"
    
          " P4: Options = eeeeee"
    
          "     B26: (f) gggggg R/W allowed to use RAW"
          "     B25: (f) gggggg Recovered Servo Sk Err Reporting"
          "     B24: (f) gggggg Ext WUS Err Retries OR Reduced Erasure correction"
    
          "     B23: (f) gggggg P3: Selected OTF ECC T-level = jj"
          "     B22: (f) gggggg Max Retries In Non-User Partition"
          "     B21: (f) gggggg P1: Max Write Retries = hh"
          "     B20: (f) gggggg P2: Max Read Retries = ii"
    
          "     B19: (f) gggggg P-Fast"
          "     B18: (f) gggggg Single Retry"
          "     B17: (f) gggggg Trk Integrity Err Retry"
          "     B16: (f) gggggg Selected OTF ECC T-level (Normal Retries ONLY)"
    
          "     B15: (f) gggggg Initial RW Access"
          "     B14: (f) gggggg Selected Retry Step = kk"
          "     B13: (f) gggggg OTF on Full Retry Steps"
          "     B12: (f) gggggg OTF on Full-Hidden Retry Steps"
    
          "     B11: (f) gggggg OTF on Normal Retry Steps"
          "     B10: (f) gggggg OTF on Initial Access"
          "     B09: (f) gggggg undo of Retry Tweaks"
          "     B08: (f) gggggg Full Retries"
    
          "     B07: (f) gggggg Full-Hidden Retries"
          "     B06: (f) gggggg Normal Retries"
          "     B05: (f) gggggg Early Err Recovery Exit"
          "     B04: (f) gggggg Restricted Servo Flaw Coasting during Write"
    
          "     B03: (f) gggggg Restricted Servo Flaw Coasting during Read"
          "     B02: (f) gggggg xfer of Uncorrectable Sectors"
          "     B01: (f) gggggg Min OTF ECC Correction"
          "     B00: (f) gggggg Max OTF ECC Correction"
    
       where
    
          a      is the Error Recovery Mode number
    
          bbbbbb is a string representing the Error Recovery Mode
    
          eeeeee are the Error Recovery Options that are selected for the current Error
                 Recovery Mode
    
          f      is the state of the options bit
    
          gggggg is a string indicating whether the feature controlled by the options bit is
                 enabled or disabled
    
          hh     is the maximum number of allowable write retries for the current Error
                 Recovery Mode
    
          ii     is the maximum number of allowable read retries for the current Error
                 Recovery Mode
    
          jj     is the ECC T-Level to be used for On-The-Fly Correction for the current
                 Error Recovery Mode
    
          kk     is the Selected Error Retry Step for the current Error Recovery Mode
    
  Revision History:

    0001.0000   Initial revision.
    0002.0000   Added support for recent changes to the "options" parameter (non-DERP).
    0010.0000   Added support for DERP and simple retries.  (NOTE: Several revisions have
                been skipped because this command shares the same command letter with the
                "regular" Set Retries command and the old command must still be supported.)
    0011.0000   Combined the PSG Diagnostic Error Codes (PSGDEC) and the Diagnostic External
                Test Service Error Codes (DETSEC) into a single set of Diagnostic Error Codes
                (DiagError).