Annotation of 43BSDReno/sys/vaxif/if_ilreg.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1982, 1986 Regents of the University of California.
        !             3:  * All rights reserved.
        !             4:  *
        !             5:  * Redistribution is only permitted until one year after the first shipment
        !             6:  * of 4.4BSD by the Regents.  Otherwise, redistribution and use in source and
        !             7:  * binary forms are permitted provided that: (1) source distributions retain
        !             8:  * this entire copyright notice and comment, and (2) distributions including
        !             9:  * binaries display the following acknowledgement:  This product includes
        !            10:  * software developed by the University of California, Berkeley and its
        !            11:  * contributors'' in the documentation or other materials provided with the
        !            12:  * distribution and in all advertising materials mentioning features or use
        !            13:  * of this software.  Neither the name of the University nor the names of
        !            14:  * its contributors may be used to endorse or promote products derived from
        !            15:  * this software without specific prior written permission.
        !            16:  * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
        !            17:  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
        !            18:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            19:  *
        !            20:  *     @(#)if_ilreg.h  7.3 (Berkeley) 6/28/90
        !            21:  */
        !            22: 
        !            23: /*
        !            24:  * Interlan Ethernet Communications Controller interface
        !            25:  */
        !            26: struct ildevice {
        !            27:        short   il_csr;         /* Command and Status Register */
        !            28:        short   il_bar;         /* Buffer Address Register */
        !            29:        short   il_bcr;         /* Byte Count Register */
        !            30: };
        !            31: 
        !            32: /*
        !            33:  * Command and status bits
        !            34:  */
        !            35: #define        IL_EUA          0xc000          /* Extended Unibus Address */
        !            36: #define        IL_CMD          0x3f00          /* Command Function Code */
        !            37: #define        IL_CDONE        0x0080          /* Command Done */
        !            38: #define        IL_CIE          0x0040          /* Command Interrupt Enable */
        !            39: #define        IL_RDONE        0x0020          /* Receive DMA Done */
        !            40: #define        IL_RIE          0x0010          /* Receive Interrupt Enable */
        !            41: #define        IL_STATUS       0x000f          /* Command Status Code */
        !            42: 
        !            43: #define        IL_BITS         "\20\10CDONE\7CIE\6RDONE\5RIE"
        !            44: 
        !            45: /* command definitions */
        !            46: #define        ILC_MLPBAK      0x0100          /* Set Module Interface Loopback Mode */
        !            47: #define        ILC_ILPBAK      0x0200          /* Set Internal Loopback Mode */
        !            48: #define        ILC_CLPBAK      0x0300          /* Clear Loopback Mode */
        !            49: #define        ILC_PRMSC       0x0400          /* Set Promiscuous Receive Mode */
        !            50: #define        ILC_CLPRMSC     0x0500          /* Clear Promiscuous Receive Mode */
        !            51: #define        ILC_RCVERR      0x0600          /* Set Receive-On-Error Bit */
        !            52: #define        ILC_CRCVERR     0x0700          /* Clear Receive-On-Error Bit */
        !            53: #define        ILC_OFFLINE     0x0800          /* Go Offline */
        !            54: #define        ILC_ONLINE      0x0900          /* Go Online */
        !            55: #define        ILC_DIAG        0x0a00          /* Run On-board Diagnostics */
        !            56: #define        ILC_ISA         0x0d00          /* Set Insert Source Address Mode */
        !            57: #define        ILC_CISA        0x0e00          /* Clear Insert Source Address Mode */
        !            58: #define        ILC_DEFPA       0x0f00          /* Set Physical Address to Default */
        !            59: #define        ILC_ALLMC       0x1000          /* Set Receive All Multicast Packets */
        !            60: #define        ILC_CALLMC      0x1100          /* Clear Receive All Multicast */
        !            61: #define        ILC_STAT        0x1800          /* Report and Reset Statistics */
        !            62: #define        ILC_DELAYS      0x1900          /* Report Collision Delay Times */
        !            63: #define        ILC_RCV         0x2000          /* Supply Receive Buffer */
        !            64: #define        ILC_LDXMIT      0x2800          /* Load Transmit Data */
        !            65: #define        ILC_XMIT        0x2900          /* Load Transmit Data and Send */
        !            66: #define        ILC_LDGRPS      0x2a00          /* Load Group Addresses */
        !            67: #define        ILC_RMGRPS      0x2b00          /* Delete Group Addresses */
        !            68: #define        ILC_LDPA        0x2c00          /* Load Physical Address */
        !            69: #define        ILC_FLUSH       0x3000          /* Flush Receive BAR/BCR Queue */
        !            70: #define        ILC_RESET       0x3f00          /* Reset */
        !            71: 
        !            72: /*
        !            73:  * Error codes found in the status bits of the csr.
        !            74:  */
        !            75: #define        ILERR_SUCCESS           0       /* command successful */
        !            76: #define        ILERR_RETRIES           1       /* " " with retries */
        !            77: #define        ILERR_BADCMD            2       /* illegal command */
        !            78: #define        ILERR_INVCMD            3       /* invalid command */
        !            79: #define        ILERR_RECVERR           4       /* receiver error */
        !            80: #define        ILERR_BUFSIZ            5       /* buffer size too big */
        !            81: #define        ILERR_FRAMESIZ          6       /* frame size too small */
        !            82: #define        ILERR_COLLISIONS        8       /* excessive collisions */
        !            83: #define        ILERR_BUFALIGNMENT      10      /* buffer not word aligned */
        !            84: #define        ILERR_NXM               15      /* non-existent memory */
        !            85: 
        !            86: #define        NILERRS                 16
        !            87: #ifdef ILERRS
        !            88: char *ilerrs[NILERRS] = {
        !            89:        "success",                      /*  0 */
        !            90:        "success with retries",         /*  1 */
        !            91:        "illegal command",              /*  2 */
        !            92:        "inappropriate command",        /*  3 */
        !            93:        "failure",                      /*  4 */
        !            94:        "buffer size exceeded",         /*  5 */
        !            95:        "frame too small",              /*  6 */
        !            96:        0,                              /*  7 */
        !            97:        "excessive collisions",         /*  8 */
        !            98:        0,                              /*  9 */
        !            99:        "buffer alignment error",       /* 10 */
        !           100:        0,                              /* 11 */
        !           101:        0,                              /* 12 */
        !           102:        0,                              /* 13 */
        !           103:        0,                              /* 14 */
        !           104:        "non-existent memory"           /* 15 */
        !           105: };
        !           106: #endif
        !           107: 
        !           108: /*
        !           109:  * Diagnostics codes.
        !           110:  */
        !           111: #define        ILDIAG_SUCCESS          0       /* no problems */
        !           112: #define        ILDIAG_CHKSUMERR        1       /* ROM/RAM checksum error */
        !           113: #define        ILDIAG_DMAERR           2       /* DMA not working */
        !           114: #define        ILDIAG_XMITERR          3       /* xmit circuitry failure */
        !           115: #define        ILDIAG_RECVERR          4       /* rcvr circuitry failure */
        !           116: #define        ILDIAG_LOOPBACK         5       /* loopback test failed */
        !           117: 
        !           118: #define        NILDIAGS                6
        !           119: #ifdef ILDIAGS
        !           120: char *ildiag[NILDIAGS] = {
        !           121:        "success",                      /* 0 */
        !           122:        "checksum error",               /* 1 */
        !           123:        "NM10 dma error",               /* 2 */
        !           124:        "transmitter error",            /* 3 */
        !           125:        "receiver error",               /* 4 */
        !           126:        "loopback failure",             /* 5 */
        !           127: };
        !           128: #endif
        !           129: 
        !           130: /*
        !           131:  * Frame status bits, returned in frame status byte
        !           132:  * at the top of each received packet.
        !           133:  */
        !           134: #define        ILFSTAT_C       0x1             /* CRC error */
        !           135: #define        ILFSTAT_A       0x2             /* alignment error */
        !           136: #define        ILFSTAT_L       0x4             /* 1+ frames lost just before */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.