Go to the documentation of this file.
30 typedef unsigned char byte;
31 typedef unsigned short word;
32 typedef unsigned long int dword;
37 #define SMC_IO_EXTENT 16
60 #define BANK_SELECT 14
65 #define TCR_ENABLE 0x0001
66 #define TCR_FDUPLX 0x0800
67 #define TCR_STP_SQET 0x1000
68 #define TCR_MON_CNS 0x0400
69 #define TCR_PAD_ENABLE 0x0080
74 #define TCR_NORMAL TCR_ENABLE
78 #define ES_LINK_OK 0x4000
81 #define RCR_SOFTRESET 0x8000
82 #define RCR_STRIP_CRC 0x200
83 #define RCR_ENABLE 0x100
85 #define RCR_PROMISC 0x2
88 #define RCR_NORMAL (RCR_STRIP_CRC | RCR_ENABLE)
98 #define CFG_AUI_SELECT 0x100
105 #define CTL_POWERDOWN 0x2000
106 #define CTL_LE_ENABLE 0x80
107 #define CTL_CR_ENABLE 0x40
108 #define CTL_TE_ENABLE 0x0020
109 #define CTL_AUTO_RELEASE 0x0800
110 #define CTL_EPROM_ACCESS 0x0003
116 #define MC_ALLOC 0x20
117 #define MC_RESET 0x40
118 #define MC_REMOVE 0x60
119 #define MC_RELEASE 0x80
120 #define MC_FREEPKT 0xA0
121 #define MC_ENQUEUE 0xC0
126 #define FP_RXEMPTY 0x8000
127 #define FP_TXEMPTY 0x80
130 #define PTR_READ 0x2000
131 #define PTR_RCV 0x8000
132 #define PTR_AUTOINC 0x4000
133 #define PTR_AUTO_INC 0x0040
140 #define IM_RCV_INT 0x1
141 #define IM_TX_INT 0x2
142 #define IM_TX_EMPTY_INT 0x4
143 #define IM_ALLOC_INT 0x8
144 #define IM_RX_OVRN_INT 0x10
145 #define IM_EPH_INT 0x20
146 #define IM_ERCV_INT 0x40
165 static const char * chip_ids[ 15 ] = {
179 #define TS_SUCCESS 0x0001
180 #define TS_LOSTCAR 0x0400
181 #define TS_LATCOL 0x0200
182 #define TS_16COL 0x0010
187 #define RS_ALGNERR 0x8000
188 #define RS_BADCRC 0x2000
189 #define RS_ODDFRAME 0x1000
190 #define RS_TOOLONG 0x0800
191 #define RS_TOOSHORT 0x0400
192 #define RS_MULTICAST 0x0001
193 #define RS_ERRORS (RS_ALGNERR | RS_BADCRC | RS_TOOLONG | RS_TOOSHORT)
195 static const char * interfaces[ 2 ] = {
"TP",
"AUI" };
204 #define SMC_SELECT_BANK(x) { outw( x, ioaddr + BANK_SELECT ); }
207 #define SMC_DELAY() { inw( ioaddr + RCR );\
208 inw( ioaddr + RCR );\
209 inw( ioaddr + RCR ); }
212 #define SMC_ENABLE_INT(x) {\
215 mask = inb( ioaddr + INT_MASK );\
217 outb( mask, ioaddr + INT_MASK ); \
222 #define SMC_DISABLE_INT(x) {\
225 mask = inb( ioaddr + INT_MASK );\
227 outb( mask, ioaddr + INT_MASK ); \
238 #define SMC_INTERRUPT_MASK (IM_EPH_INT | IM_RX_OVRN_INT | IM_RCV_INT)