{
{ CML$MDI_FAILURE_DATA
{
{
{ PURPOSE:
{    The purpose of this statistic is to record failure data
{    captured by NOS/VE when accessing the MDI.
{
{ FREQUENCY: At occurrence of failure.
{
{ CONTENT:
{    The  descriptive-data portion of this statistic contains:
{
{    '<mf>.<iou>.<pp>.<channel>.<element>*<severity>*<symptom>'
{
{      where <mf> is the identification of the mainframe in the form
{        $SYSTEM_mmmm_ssss.  Where 'mmmm' is the model number of
{        Central Processor zero (CP0), e.g. 0990, and 'ssss' is the
{        serial number of that processor, e.g. 0104.
{
{      where  <iou>  is  the  string  'IOUn' where n is 0 or 1.
{        This identifies the IOU associated with the channel over
{        which the failure was reported.
{
{      where <pp> is the string 'PPn' or 'CPPn' where 'n' is the decimal
{        representation of the physical PP number used to process
{        the failing request. The C prefix is used to indicate that
{        the PP is a concurrent PP.
{
{      where <channel> is  the string 'CHn' or 'CCHn' ,
{        where 'n' is the decimal representation of the channel.
{        The C prefix is used to indicate that the channel is
{        a concurrent channel.
{
{      where <element> is the element name of the MDI being
{        accessed when the failure occurred.
{
{      where <severity> is the string 'UF' for unrecovered, 'RF' for
{        recovered, 'IF' for intermediate failure log-entry, and 'IM'
{        for informative messages.
{
{        The PP reports failure data and diagnostic results  as  an
{        intermediate  failure  log-entry  prior  to retrying an i/o
{        request.  This is due to the fact that retry attempts are
{        not done immediatly but alternately with other I/O queued.
{        An intermediate failure    log-entry   will   provide   the
{        first-failure data captured by the PP  during  the  initial
{        attempt  at  the  request  or  during  a subsequent request
{        retry.
{
{        For  all failures the counter values contain
{        the failure data corresponding  to  the first  unsuccessful
{        try of the i/o request.
{
{      where <symptom> is the symptom/action statement  provided  by
{        the system.
{
{
{    The absence or presence of information in a counter word is
{    determined by the same convention used by other peripheral
{    statistics.  That is if bit 0, (left-most bit) of a counter word,
{    is not set the counter contains a bonafide value. The convention
{    does not apply to detailed status, whose presence  is
{    determined by the length of the statistic.
{
{    The counter-value portion of this statistic contains:
{
{    1.  IOU number/Logical PP number
{        Bits 46 .. 51 = IOU number
{        bit  57       = 1 if concurrent pp
{        Bits 58 .. 63 = logical PP number
{    2.  IOU number/Channel Number of Controller
{        bits 00 .. 15 = channel error status if concurrent pp
{        Bits 46 .. 51 = IOU number
{        bit  57       = 1 if concurrent pp
{        Bits 58 .. 63 = Channel Number of Controller
{    3.  Logical Operation Code
{        1 - write
{        2 - read
{        3 - read_detailed_status
{        4 - read_diagnostic_command
{        5 - read_general_status
{        6 - inline_write
{    4.  Log-entry Class
{        0 - Recovered Failure Report
{        1 - Unrecovered Failure Report
{        2 - Intermediate Failure Report
{        3 - Informative Message
{    5.  Failure Symptom Code (tells what the system thinks is wrong)
{
{        1 - INVALID STATE TRANSITION - The MDI has switched to an
{            invalid state. The counter CURRENT STATE contains the
{            current MDI state. The counter PREVIOUS STATE contains
{            the previous MDI state.
{
{        2 - GENERAL STATUS BUSY TIMEOUT - The busy bit in general
{            status did not clear within 100 milliseconds after a read
{            general status function was accepted. The counter
{            PREVIOUS FUNCTION contains the last function prior to the
{            busy timeout error.
{
{        3 - FUNCTION TIMEOUT - MDI did not accept a function (by
{            deactivating the channel) within 100 milliseconds.  TIMED
{            OUT FUNCTION contains the function on which the error
{            occured.
{
{        4 - FUNCTION TIMEOUT CHANNEL ERROR - MDI did not accept a
{            function within 100 milliseconds and the channel error
{            flag was set.  TIMED OUT FUNCTION contains the function
{            on which the error occured.
{
{        5 - INPUT CHANNEL PARITY - On an input from the MDI to PP the
{            channel-error-flag was set.
{
{        6 - OUTPUT CHANNEL PARITY - On an output from the PP to the
{            MDI, the MDI reported a parity error in status but the
{            channel-error-flag was not set.
{
{        7 - IOU OUTPUT PARITY - On an output from PP to MDI both the
{            channel-error-flag and the MDI's status indicated a
{            parity error occurred.
{
{        8 - INDETERMINATE OUTPUT PARITY - On an output from PP to
{            MDI the channel-error-flag was set but there was no
{            error reported by the MDI.  This may mean there is a
{            problem in the IOU and/or the channel and/or the MDI.
{
{        9 - CHANNEL FULL - The channel did not go empty within one
{            millisecond following a write to the MDI.
{
{        10 - MESSAGE LENGTH VERIFICATION ERROR - The length specified
{            in the header of a message from the MDI doesnt match the
{            size of the record read.  The expected length of the
{            message is contained in counter EXPECTED LENGTH and the
{            actual length in counter ACTUAL LENGTH.  The case were a
{            message is longer than expected is indicated by an actual
{            length value of 80000000(16).
{
{        11 - GENERAL STATUS SEND DATA TIMEOUT - The send data bit in
{             general status was not set within one second of being
{             cleared.
{
{        12 - GENERAL STATUS AVAILABLE TIMEOUT - General status was
{             not available (channel full) within one millisecond of
{             the general status function being accepted. The counter
{             PREVIOUS FUNCTION contains the last function prior to
{             the general status available timeout. The counter
{             PREVIOUS STATE contains the last known state of the MCI.
{
{        13 - CHANNEL EMPTY - The channel did not go full within one
{             millisecond following the MDI's acceptance of a function
{             which was to be followed by an input operation.
{
{        14 - CHANNEL INACTIVE - The channel was inactive following a
{             write operation and no general status errors were
{             indicated.
{
{        15 - MDI RESET - The MDI has switched to reset state.
{
{        16 - MDI AVAILABLE - The MDI has entered loading or
{             operational state.
{
{        17 - INCOMPLETE TRANSFER - The input/output operation did not
{             complete as indicated by the PP's A register being non
{             zero.  However the channel remained active and no
{             general status or channel errors were indicated.
{
{        18 - INDETERMINATE (channel or MDI or ethernet) General
{             status indicates an error but detailed status could not
{             be obtained or did not contain values which could be
{             decoded to one of the preceding errors.
{
{        19 - GENERAL STATUS DATA AVAILABLE TIMEOUT - The data
{             available bit in general status was not set within one
{             second of recieving a Diagnostic Command to read.
{             The counter DIAGNOSTIC COMMAND contains the last
{             read diagnostic command.
{
{        20 - MESSAGE CONTENT ERROR - An invalid command was read
{             during diagnostic mode. The counter DIAGNOSTIC
{             COMMAND contains the last read diagnostic command.
{
{        21 - GENERAL STATUS CONTENT FAILURE - During diagnostic
{             state the contents of the general status was not as
{             expected. Only two error values are allowed in
{             diagnostic mode, these are 6012(8) and 4011(8).
{             Counter DIAGNOSTIC COMMAND contains the diagnostic
{             command last read.
{
{             NOTE:  If the MCI is connected to a CIO channel this
{             error could indicate that the MCI does not include
{             required FCO#48716.
{
{        22 - MASTER CLEAR FAILURE - After issuing a MASTER CLEAR
{             function the MDI failed to transition out of LOADING
{             or OPERATIONAL state.
{
{        23 - RESET FREQUENCY THRESHOLD - The MDI reset frequency
{             threshold was reached and the MDI has been downed.
{
{        24 - Reserved.
{
{        25 - ITB ERROR - The ITB error comes from a slave device and
{             indicates that it has detected an error condition.
{
{        26 - ITB PARITY ERROR - The ITB parity error signal indicates
{             that a parity error was detected on read data.
{
{        27 - CHANNEL TIMEOUT - The channel has been active for eight
{             seconds without any I/O activity.  The channel was
{             disconnected by the MCI hardware channel active
{             timeout.
{
{        28 - INPUT TRUNCATED - The PP deactivated the channel before
{             reading the entire message whose length has been set in
{             the DMA registers.
{
{        29 - PP OVERRUN - The PP has output more than the
{             maximum length set by the MCI processor in the DMA
{             registers.
{
{        30 - CHANNEL PROTOCOL NOT SUPPORTED - the version of channel
{             protocol supported by the MDI and NOS/VE are not compatible.
{             DETAILED STATUS contains the highest channel protocol supported
{             by the MDI(counter 16 bits 48 .. 55). The counter CHANNEL PROTOCOL
{             contains the highest channel protocol supported by NOS/VE.
{
{        31 - Reserved.
{
{        32 - INVALID MESSAGE TYPE - The message type value indicated in
{             general status (counter 14 bits 58 - 60) is invalid. Valid
{             message type values are (0 = channelnet message, 1 = channel
{             connection message, 5 = inline diagnostic message).
{
{        33 - MAXIMUM RECORD SIZE EXCEEDED - The record size indicated in
{             the record header exceeds the maximum allowed for this
{             device. The counter ACTUAL LENGTH contains the length of
{             the record.
{
{        34 - MCI DETECTED LENGTH ERROR - The MCI detected a length error
{             after a write operation.
{
{    6. Request Retry Count - The number of times the PP driver
{       retried the i/o request. (0..3)
{
{    7. Timed Out Function - The function which caused a function
{       timeout. (0 .. 07777(8))
{
{    8. Previous Function - The function executed prior to a general
{       status busy timeout error. (0 .. 07777(8))
{
{    9. Current State - If invalid state transition error.
{       Valid states are (0 = reset, 1 = diagnostic,
{       4 = loading, 10(8) = operational).
{
{    10. Previous State - If invalid state transition error or
{        general status available timeout.
{        Valid states are (0 = reset, 1 = diagnostic,
{        4 = loading, 10(8) = operational).
{
{    11. Expected Length - If error is message length
{        verification error. (0 .. 0ffffffff(16))
{
{    12. Actual Length - If error is message length
{        verification error. (0 .. 0ffffffff(16))
{
{    13. Diagnostic Command - Contains the command read if error is
{        Message Content Error, General Status Data Available Timeout,
{        Genreral Status Content Failure. (0 .. 0fff(16)).
{
{    14. General Status - General status is always returned if
{        available. (0 .. 07777(8))
{
{    15. Channel Protocol - If error is channel protocol not supported
{        (0 .. 0ff(16)).
{
{    16 .. 19 Detailed Status.  Detailed status is always returned if
{        the MDI is operational and detailed status can be obtained.
{

  CONST
    cml$mdi_failure_data = cmc$min_ecc + 7001;

*copyc cmc$condition_limits

