1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #define CSR0_ERR 0x8000
20 #define CSR0_BABL 0x4000
21 #define CSR0_CERR 0x2000
22 #define CSR0_MISS 0x1000
23 #define CSR0_MERR 0x0800
24 #define CSR0_RINT 0x0400
25 #define CSR0_TINT 0x0200
26 #define CSR0_IDON 0x0100
27 #define CSR0_INTR 0x0080
28 #define CSR0_INEA 0x0040
29 #define CSR0_RXON 0x0020
30 #define CSR0_TXON 0x0010
31 #define CSR0_TDMD 0x0008
32 #define CSR0_STOP 0x0004
33 #define CSR0_STRT 0x0002
34 #define CSR0_INIT 0x0001
35
36 #define CSR0_CLRALL 0x7f00
37
38
39
40
41 #define M_PROM 0x8000
42 #define M_INTL 0x0040
43 #define M_DRTY 0x0020
44 #define M_COLL 0x0010
45 #define M_DTCR 0x0008
46 #define M_LOOP 0x0004
47 #define M_DTX 0x0002
48 #define M_DRX 0x0001
49
50
51
52
53
54
55 #define RCV_OWN 0x80
56 #define RCV_ERR 0x40
57 #define RCV_FRAM 0x20
58 #define RCV_OFLO 0x10
59 #define RCV_CRC 0x08
60 #define RCV_BUF_ERR 0x04
61 #define RCV_START 0x02
62 #define RCV_END 0x01
63
64
65
66
67
68
69 #define XMIT_OWN 0x80
70 #define XMIT_ERR 0x40
71 #define XMIT_RETRY 0x10
72 #define XMIT_1_RETRY 0x08
73 #define XMIT_DEF 0x04
74 #define XMIT_START 0x02
75 #define XMIT_END 0x01
76
77
78
79
80
81 #define XMIT_TDRMASK 0x03ff
82 #define XMIT_RTRY 0x0400
83 #define XMIT_LCAR 0x0800
84 #define XMIT_LCOL 0x1000
85 #define XMIT_RESERV 0x2000
86 #define XMIT_UFLO 0x4000
87 #define XMIT_BUFF 0x8000
88
89 struct init_block
90 {
91 unsigned short mode;
92 unsigned char eaddr[6];
93 unsigned char filter[8];
94
95 unsigned long rrp;
96
97 unsigned long trp;
98 };
99
100 struct rmd
101 {
102 union
103 {
104 volatile unsigned long buffer;
105 struct
106 {
107 volatile unsigned char dummy[3];
108 volatile unsigned char status;
109 } s;
110 } u;
111 short blen;
112 volatile unsigned short mlen;
113 };
114
115 struct tmd
116 {
117 union
118 {
119 volatile unsigned long buffer;
120 struct
121 {
122 volatile unsigned char dummy[3];
123 volatile unsigned char status;
124 } s;
125 } u;
126 unsigned short blen;
127 volatile unsigned short status2;
128 };
129
130