2 * linux/drivers/net/am79c961.h
5 #ifndef _LINUX_am79c961a_H
6 #define _LINUX_am79c961a_H
8 /* use 0 for production, 1 for verification, >2 for debug. debug flags: */
20 #define NET_RESET 0x14
27 #define CSR0_INIT 0x0001
28 #define CSR0_STRT 0x0002
29 #define CSR0_STOP 0x0004
30 #define CSR0_TDMD 0x0008
31 #define CSR0_TXON 0x0010
32 #define CSR0_RXON 0x0020
33 #define CSR0_IENA 0x0040
34 #define CSR0_INTR 0x0080
35 #define CSR0_IDON 0x0100
36 #define CSR0_TINT 0x0200
37 #define CSR0_RINT 0x0400
38 #define CSR0_MERR 0x0800
39 #define CSR0_MISS 0x1000
40 #define CSR0_CERR 0x2000
41 #define CSR0_BABL 0x4000
42 #define CSR0_ERR 0x8000
45 #define CSR3_EMBA 0x0008
46 #define CSR3_DXMT2PD 0x0010
47 #define CSR3_LAPPEN 0x0020
48 #define CSR3_IDONM 0x0100
49 #define CSR3_TINTM 0x0200
50 #define CSR3_RINTM 0x0400
51 #define CSR3_MERRM 0x0800
52 #define CSR3_MISSM 0x1000
53 #define CSR3_BABLM 0x4000
54 #define CSR3_MASKALL 0x5F00
65 #define MODE_DISRX 0x0001
66 #define MODE_DISTX 0x0002
67 #define MODE_LOOP 0x0004
68 #define MODE_DTCRC 0x0008
69 #define MODE_COLL 0x0010
70 #define MODE_DRETRY 0x0020
71 #define MODE_INTLOOP 0x0040
72 #define MODE_PORT0 0x0080
73 #define MODE_DRXPA 0x2000
74 #define MODE_DRXBA 0x4000
75 #define MODE_PROMISC 0x8000
87 #define RMD_ENP 0x0100
88 #define RMD_STP 0x0200
89 #define RMD_CRC 0x0800
90 #define RMD_FRAM 0x2000
91 #define RMD_ERR 0x4000
92 #define RMD_OWN 0x8000
94 #define TMD_ENP 0x0100
95 #define TMD_STP 0x0200
96 #define TMD_MORE 0x1000
97 #define TMD_ERR 0x4000
98 #define TMD_OWN 0x8000
100 #define TST_RTRY 0x0200
101 #define TST_LCAR 0x0400
102 #define TST_LCOL 0x1000
103 #define TST_UFLO 0x4000
106 struct enet_statistics stats
;
107 unsigned long rxbuffer
[RX_BUFFERS
];
108 unsigned long txbuffer
[TX_BUFFERS
];
109 unsigned char txhead
;
110 unsigned char txtail
;
111 unsigned char rxhead
;
112 unsigned char rxtail
;
117 extern int am79c961_probe (struct net_device
*dev
);
118 static int am79c961_probe1 (struct net_device
*dev
);
119 static int am79c961_open (struct net_device
*dev
);
120 static int am79c961_sendpacket (struct sk_buff
*skb
, struct net_device
*dev
);
121 static void am79c961_interrupt (int irq
, void *dev_id
, struct pt_regs
*regs
);
122 static void am79c961_rx (struct net_device
*dev
, struct dev_priv
*priv
);
123 static void am79c961_tx (struct net_device
*dev
, struct dev_priv
*priv
);
124 static int am79c961_close (struct net_device
*dev
);
125 static struct enet_statistics
*am79c961_getstats (struct net_device
*dev
);
126 static void am79c961_setmulticastlist (struct net_device
*dev
);