2 * Definitions for Intel 82593 CSMA/CD Core LAN Controller
3 * The definitions are taken from the 1992 users manual with Intel
4 * order number 297125-001.
6 * /usr/src/pc/RCS/i82593.h,v 1.1 1996/07/17 15:23:12 root Exp
8 * Copyright 1994, Anders Klemets <klemets@it.kth.se>
10 * This software may be freely distributed for noncommercial purposes
11 * as long as this notice is retained.
15 * Revision 1.1 1996/07/17 15:23:12 root
18 * Revision 1.3 1995/04/05 15:13:58 adj
19 * Initial alpha release
21 * Revision 1.2 1994/06/16 23:57:31 klemets
22 * Mirrored all the fields in the configuration block.
24 * Revision 1.1 1994/06/02 20:25:34 klemets
32 /* Intel 82593 CSMA/CD Core LAN Controller */
34 /* Port 0 Command Register definitions */
36 /* Execution operations */
37 #define OP0_NOP 0 /* CHNL = 0 */
38 #define OP0_SWIT_TO_PORT_1 0 /* CHNL = 1 */
39 #define OP0_IA_SETUP 1
40 #define OP0_CONFIGURE 2
41 #define OP0_MC_SETUP 3
42 #define OP0_TRANSMIT 4
45 #define OP0_DIAGNOSE 7
46 #define OP0_TRANSMIT_NO_CRC 9
47 #define OP0_RETRANSMIT 12
49 /* Reception operations */
50 #define OP0_RCV_ENABLE 8
51 #define OP0_RCV_DISABLE 10
52 #define OP0_STOP_RCV 11
53 /* Status pointer control operations */
54 #define OP0_FIX_PTR 15 /* CHNL = 1 */
55 #define OP0_RLS_PTR 15 /* CHNL = 0 */
58 #define CR0_CHNL (1 << 4) /* 0=Channel 0, 1=Channel 1 */
59 #define CR0_STATUS_0 0x00
60 #define CR0_STATUS_1 0x20
61 #define CR0_STATUS_2 0x40
62 #define CR0_STATUS_3 0x60
63 #define CR0_INT_ACK (1 << 7) /* 0=No ack, 1=acknowledge */
65 /* Port 0 Status Register definitions */
67 #define SR0_NO_RESULT 0 /* dummy */
68 #define SR0_EVENT_MASK 0x0f
69 #define SR0_IA_SETUP_DONE 1
70 #define SR0_CONFIGURE_DONE 2
71 #define SR0_MC_SETUP_DONE 3
72 #define SR0_TRANSMIT_DONE 4
73 #define SR0_TDR_DONE 5
74 #define SR0_DUMP_DONE 6
75 #define SR0_DIAGNOSE_PASSED 7
76 #define SR0_TRANSMIT_NO_CRC_DONE 9
77 #define SR0_RETRANSMIT_DONE 12
78 #define SR0_EXECUTION_ABORTED 13
79 #define SR0_END_OF_FRAME 8
80 #define SR0_RECEPTION_ABORTED 10
81 #define SR0_DIAGNOSE_FAILED 15
82 #define SR0_STOP_REG_HIT 11
84 #define SR0_CHNL (1 << 4)
85 #define SR0_EXECUTION (1 << 5)
86 #define SR0_RECEPTION (1 << 6)
87 #define SR0_INTERRUPT (1 << 7)
88 #define SR0_BOTH_RX_TX (SR0_EXECUTION | SR0_RECEPTION)
90 #define SR3_EXEC_STATE_MASK 0x03
91 #define SR3_EXEC_IDLE 0
92 #define SR3_TX_ABORT_IN_PROGRESS 1
93 #define SR3_EXEC_ACTIVE 2
94 #define SR3_ABORT_IN_PROGRESS 3
95 #define SR3_EXEC_CHNL (1 << 2)
96 #define SR3_STP_ON_NO_RSRC (1 << 3)
97 #define SR3_RCVING_NO_RSRC (1 << 4)
98 #define SR3_RCV_STATE_MASK 0x60
99 #define SR3_RCV_IDLE 0x00
100 #define SR3_RCV_READY 0x20
101 #define SR3_RCV_ACTIVE 0x40
102 #define SR3_RCV_STOP_IN_PROG 0x60
103 #define SR3_RCV_CHNL (1 << 7)
105 /* Port 1 Command Register definitions */
108 #define OP1_SWIT_TO_PORT_0 1
109 #define OP1_INT_DISABLE 2
110 #define OP1_INT_ENABLE 3
113 #define OP1_POWER_DOWN 8
114 #define OP1_RESET_RING_MNGMT 11
116 #define OP1_SEL_RST 15
118 #define CR1_STATUS_4 0x00
119 #define CR1_STATUS_5 0x20
120 #define CR1_STATUS_6 0x40
121 #define CR1_STOP_REG_UPDATE (1 << 7)
123 /* Receive frame status bits */
125 #define RX_RCLD (1 << 0)
126 #define RX_IA_MATCH (1 << 1)
127 #define RX_NO_AD_MATCH (1 << 2)
128 #define RX_NO_SFD (1 << 3)
129 #define RX_SRT_FRM (1 << 7)
130 #define RX_OVRRUN (1 << 8)
131 #define RX_ALG_ERR (1 << 10)
132 #define RX_CRC_ERR (1 << 11)
133 #define RX_LEN_ERR (1 << 12)
134 #define RX_RCV_OK (1 << 13)
135 #define RX_TYP_LEN (1 << 15)
137 /* Transmit status bits */
139 #define TX_NCOL_MASK 0x0f
140 #define TX_FRTL (1 << 4)
141 #define TX_MAX_COL (1 << 5)
142 #define TX_HRT_BEAT (1 << 6)
143 #define TX_DEFER (1 << 7)
144 #define TX_UND_RUN (1 << 8)
145 #define TX_LOST_CTS (1 << 9)
146 #define TX_LOST_CRS (1 << 10)
147 #define TX_LTCOL (1 << 11)
148 #define TX_OK (1 << 13)
149 #define TX_COLL (1 << 15)
151 struct i82593_conf_block
{
152 u_char fifo_limit
: 4,
172 u_char slottim_hi
: 3,
183 u_char cs_filter
: 3,
194 tx_jabber
: 1, /* why is this called max_len in the manual? */
200 u_char dummy_6
: 6, /* supposed to be ones */
203 u_char dummy_1
: 1, /* supposed to be one */
217 u_char rbuf_size
: 5,
222 #define I82593_MAX_MULTICAST_ADDRESSES 128 /* Hardware hashed filter */
224 #endif /* _I82593_H */