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