1: /*
   2:  * Copyright (c) 1986 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)if_ilreg.h	1.1 (2.10BSD Berkeley) 12/1/86
   7:  */
   8: 
   9: /*
  10:  * Interlan Ethernet Communications Controller interface
  11:  */
  12: struct ildevice {
  13:     short   il_csr;     /* Command and Status Register */
  14:     short   il_bar;     /* Buffer Address Register */
  15:     short   il_bcr;     /* Byte Count Register */
  16:     short   il_ber;     /* Bus Extension Register */
  17: };
  18: 
  19: /*
  20:  * Command and status bits
  21:  */
  22: #define IL_EUA      0xc000      /* Extended Unibus Address */
  23: #define IL_CMD      0x3f00      /* Command Function Code */
  24: #define IL_CDONE    0x0080      /* Command Done */
  25: #define IL_CIE      0x0040      /* Command Interrupt Enable */
  26: #define IL_RDONE    0x0020      /* Receive DMA Done */
  27: #define IL_RIE      0x0010      /* Receive Interrupt Enable */
  28: #define IL_STATUS   0x000f      /* Command Status Code */
  29: 
  30: #define IL_BITS     "\20\10CDONE\7CIE\6RDONE\5RIE"
  31: 
  32: /* command definitions */
  33: #define ILC_MLPBAK  0x0100      /* Set Module Interface Loopback Mode */
  34: #define ILC_ILPBAK  0x0200      /* Set Internal Loopback Mode */
  35: #define ILC_CLPBAK  0x0300      /* Clear Loopback Mode */
  36: #define ILC_PRMSC   0x0400      /* Set Promiscuous Receive Mode */
  37: #define ILC_CLPRMSC 0x0500      /* Clear Promiscuous Receive Mode */
  38: #define ILC_RCVERR  0x0600      /* Set Receive-On-Error Bit */
  39: #define ILC_CRCVERR 0x0700      /* Clear Receive-On-Error Bit */
  40: #define ILC_OFFLINE 0x0800      /* Go Offline */
  41: #define ILC_ONLINE  0x0900      /* Go Online */
  42: #define ILC_DIAG    0x0a00      /* Run On-board Diagnostics */
  43: #define ILC_ISA     0x0d00      /* Set Insert Source Address Mode */
  44: #define ILC_CISA    0x0e00      /* Clear Insert Source Address Mode */
  45: #define ILC_DEFPA   0x0f00      /* Set Physical Address to Default */
  46: #define ILC_ALLMC   0x1000      /* Set Receive All Multicast Packets */
  47: #define ILC_CALLMC  0x1100      /* Clear Receive All Multicast */
  48: #define ILC_STAT    0x1800      /* Report and Reset Statistics */
  49: #define ILC_DELAYS  0x1900      /* Report Collision Delay Times */
  50: #define ILC_RCV     0x2000      /* Supply Receive Buffer */
  51: #define ILC_LDXMIT  0x2800      /* Load Transmit Data */
  52: #define ILC_XMIT    0x2900      /* Load Transmit Data and Send */
  53: #define ILC_LDGRPS  0x2a00      /* Load Group Addresses */
  54: #define ILC_RMGRPS  0x2b00      /* Delete Group Addresses */
  55: #define ILC_LDPA    0x2c00      /* Load Physical Address */
  56: #define ILC_FLUSH   0x3000      /* Flush Receive BAR/BCR Queue */
  57: #define ILC_RESET   0x3f00      /* Reset */
  58: 
  59: /*
  60:  * Error codes found in the status bits of the csr.
  61:  */
  62: #define ILERR_SUCCESS       0   /* command successful */
  63: #define ILERR_RETRIES       1   /* " " with retries */
  64: #define ILERR_BADCMD        2   /* illegal command */
  65: #define ILERR_INVCMD        3   /* invalid command */
  66: #define ILERR_RECVERR       4   /* receiver error */
  67: #define ILERR_BUFSIZ        5   /* buffer size too big */
  68: #define ILERR_FRAMESIZ      6   /* frame size too small */
  69: #define ILERR_COLLISIONS    8   /* excessive collisions */
  70: #define ILERR_BUFALIGNMENT  10  /* buffer not word aligned */
  71: #define ILERR_NXM       15  /* non-existent memory */
  72: 
  73: #define NILERRS         16
  74: #ifdef ILERRS
  75: char *ilerrs[NILERRS] = {
  76:     "success",          /*  0 */
  77:     "success with retries",     /*  1 */
  78:     "illegal command",      /*  2 */
  79:     "inappropriate command",    /*  3 */
  80:     "failure",          /*  4 */
  81:     "buffer size exceeded",     /*  5 */
  82:     "frame too small",      /*  6 */
  83:     0,              /*  7 */
  84:     "excessive collisions",     /*  8 */
  85:     0,              /*  9 */
  86:     "buffer alignment error",   /* 10 */
  87:     0,              /* 11 */
  88:     0,              /* 12 */
  89:     0,              /* 13 */
  90:     0,              /* 14 */
  91:     "non-existent memory"       /* 15 */
  92: };
  93: #endif
  94: 
  95: /*
  96:  * Diagnostics codes.
  97:  */
  98: #define ILDIAG_SUCCESS      0   /* no problems */
  99: #define ILDIAG_CHKSUMERR    1   /* ROM/RAM checksum error */
 100: #define ILDIAG_DMAERR       2   /* DMA not working */
 101: #define ILDIAG_XMITERR      3   /* xmit circuitry failure */
 102: #define ILDIAG_RECVERR      4   /* rcvr circuitry failure */
 103: #define ILDIAG_LOOPBACK     5   /* loopback test failed */
 104: 
 105: #define NILDIAGS        6
 106: #ifdef ILDIAGS
 107: char *ildiag[NILDIAGS] = {
 108:     "success",          /* 0 */
 109:     "checksum error",       /* 1 */
 110:     "NM10 dma error",       /* 2 */
 111:     "transmitter error",        /* 3 */
 112:     "receiver error",       /* 4 */
 113:     "loopback failure",     /* 5 */
 114: };
 115: #endif
 116: 
 117: /*
 118:  * Frame status bits, returned in frame status byte
 119:  * at the top of each received packet.
 120:  */
 121: #define ILFSTAT_C   0x1     /* CRC error */
 122: #define ILFSTAT_A   0x2     /* alignment error */
 123: #define ILFSTAT_L   0x4     /* 1+ frames lost just before */

Defined variables

ildiag defined in line 107; never used
ilerrs defined in line 75; never used

Defined struct's

ildevice defined in line 12; used 30 times

Defined macros

ILC_ALLMC defined in line 46; never used
ILC_CALLMC defined in line 47; never used
ILC_CISA defined in line 44; used 1 times
ILC_CLPBAK defined in line 35; never used
ILC_CLPRMSC defined in line 37; never used
ILC_CRCVERR defined in line 39; never used
ILC_DEFPA defined in line 45; never used
ILC_DELAYS defined in line 49; never used
ILC_DIAG defined in line 42; never used
ILC_FLUSH defined in line 56; never used
ILC_ILPBAK defined in line 34; never used
ILC_ISA defined in line 43; never used
ILC_LDGRPS defined in line 53; never used
ILC_LDPA defined in line 55; used 2 times
ILC_LDXMIT defined in line 51; never used
ILC_MLPBAK defined in line 33; never used
ILC_OFFLINE defined in line 40; used 1 times
ILC_ONLINE defined in line 41; used 1 times
ILC_PRMSC defined in line 36; never used
ILC_RCV defined in line 50; used 6 times
ILC_RCVERR defined in line 38; never used
ILC_RESET defined in line 57; used 3 times
ILC_RMGRPS defined in line 54; never used
ILC_STAT defined in line 48; used 6 times
ILC_XMIT defined in line 52; used 2 times
ILDIAG_CHKSUMERR defined in line 99; never used
ILDIAG_DMAERR defined in line 100; never used
ILDIAG_LOOPBACK defined in line 103; never used
ILDIAG_RECVERR defined in line 102; never used
ILDIAG_SUCCESS defined in line 98; never used
ILDIAG_XMITERR defined in line 101; never used
ILERR_BADCMD defined in line 64; never used
ILERR_BUFALIGNMENT defined in line 70; never used
ILERR_BUFSIZ defined in line 67; never used
ILERR_COLLISIONS defined in line 69; never used
ILERR_FRAMESIZ defined in line 68; never used
ILERR_INVCMD defined in line 65; never used
ILERR_NXM defined in line 71; never used
ILERR_RECVERR defined in line 66; never used
ILERR_RETRIES defined in line 63; used 1 times
ILERR_SUCCESS defined in line 62; used 1 times
ILFSTAT_A defined in line 122; used 1 times
ILFSTAT_C defined in line 121; used 1 times
ILFSTAT_L defined in line 123; never used
IL_BITS defined in line 30; used 2 times
IL_CDONE defined in line 24; used 6 times
IL_CIE defined in line 25; used 5 times
IL_CMD defined in line 23; used 1 times
IL_EUA defined in line 22; used 8 times
IL_RDONE defined in line 26; never used
IL_RIE defined in line 27; used 10 times
IL_STATUS defined in line 28; used 2 times
NILDIAGS defined in line 105; used 1 times
NILERRS defined in line 73; used 1 times
  • in line 75

Usage of this include

Last modified: 1987-06-20
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3282
Valid CSS Valid XHTML 1.0 Strict