Go to the documentation of this file.
28 #define VERSION "2.0 B"
39 #define SPIDER_NET_MAX_FRAME 2312
40 #define SPIDER_NET_MAX_MTU 2294
41 #define SPIDER_NET_MIN_MTU 64
43 #define SPIDER_NET_RXBUF_ALIGN 128
45 #define SPIDER_NET_RX_DESCRIPTORS_DEFAULT 256
46 #define SPIDER_NET_RX_DESCRIPTORS_MIN 16
47 #define SPIDER_NET_RX_DESCRIPTORS_MAX 512
49 #define SPIDER_NET_TX_DESCRIPTORS_DEFAULT 256
50 #define SPIDER_NET_TX_DESCRIPTORS_MIN 16
51 #define SPIDER_NET_TX_DESCRIPTORS_MAX 512
53 #define SPIDER_NET_TX_TIMER (HZ/5)
54 #define SPIDER_NET_ANEG_TIMER (HZ)
55 #define SPIDER_NET_ANEG_TIMEOUT 5
57 #define SPIDER_NET_RX_CSUM_DEFAULT 1
59 #define SPIDER_NET_WATCHDOG_TIMEOUT 50*HZ
60 #define SPIDER_NET_NAPI_WEIGHT 64
62 #define SPIDER_NET_FIRMWARE_SEQS 6
63 #define SPIDER_NET_FIRMWARE_SEQWORDS 1024
64 #define SPIDER_NET_FIRMWARE_LEN (SPIDER_NET_FIRMWARE_SEQS * \
65 SPIDER_NET_FIRMWARE_SEQWORDS * \
67 #define SPIDER_NET_FIRMWARE_NAME "spider_fw.bin"
70 #define SPIDER_NET_GHIINT0STS 0x00000000
71 #define SPIDER_NET_GHIINT1STS 0x00000004
72 #define SPIDER_NET_GHIINT2STS 0x00000008
73 #define SPIDER_NET_GHIINT0MSK 0x00000010
74 #define SPIDER_NET_GHIINT1MSK 0x00000014
75 #define SPIDER_NET_GHIINT2MSK 0x00000018
77 #define SPIDER_NET_GRESUMINTNUM 0x00000020
78 #define SPIDER_NET_GREINTNUM 0x00000024
80 #define SPIDER_NET_GFFRMNUM 0x00000028
81 #define SPIDER_NET_GFAFRMNUM 0x0000002c
82 #define SPIDER_NET_GFBFRMNUM 0x00000030
83 #define SPIDER_NET_GFCFRMNUM 0x00000034
84 #define SPIDER_NET_GFDFRMNUM 0x00000038
87 #define SPIDER_NET_GFREECNNUM 0x0000003c
88 #define SPIDER_NET_GONETIMENUM 0x00000040
90 #define SPIDER_NET_GTOUTFRMNUM 0x00000044
92 #define SPIDER_NET_GTXMDSET 0x00000050
93 #define SPIDER_NET_GPCCTRL 0x00000054
94 #define SPIDER_NET_GRXMDSET 0x00000058
95 #define SPIDER_NET_GIPSECINIT 0x0000005c
96 #define SPIDER_NET_GFTRESTRT 0x00000060
97 #define SPIDER_NET_GRXDMAEN 0x00000064
98 #define SPIDER_NET_GMRWOLCTRL 0x00000068
99 #define SPIDER_NET_GPCWOPCMD 0x0000006c
100 #define SPIDER_NET_GPCROPCMD 0x00000070
101 #define SPIDER_NET_GTTFRMCNT 0x00000078
102 #define SPIDER_NET_GTESTMD 0x0000007c
104 #define SPIDER_NET_GSINIT 0x00000080
105 #define SPIDER_NET_GSnPRGADR 0x00000084
106 #define SPIDER_NET_GSnPRGDAT 0x00000088
108 #define SPIDER_NET_GMACOPEMD 0x00000100
109 #define SPIDER_NET_GMACLENLMT 0x00000108
110 #define SPIDER_NET_GMACST 0x00000110
111 #define SPIDER_NET_GMACINTEN 0x00000118
112 #define SPIDER_NET_GMACPHYCTRL 0x00000120
114 #define SPIDER_NET_GMACAPAUSE 0x00000154
115 #define SPIDER_NET_GMACTXPAUSE 0x00000164
117 #define SPIDER_NET_GMACMODE 0x000001b0
118 #define SPIDER_NET_GMACBSTLMT 0x000001b4
120 #define SPIDER_NET_GMACUNIMACU 0x000001c0
121 #define SPIDER_NET_GMACUNIMACL 0x000001c8
123 #define SPIDER_NET_GMRMHFILnR 0x00000400
124 #define SPIDER_NET_MULTICAST_HASHES 256
126 #define SPIDER_NET_GMRUAFILnR 0x00000500
127 #define SPIDER_NET_GMRUA0FIL15R 0x00000578
129 #define SPIDER_NET_GTTQMSK 0x00000934
133 #define SPIDER_NET_GDADCHA 0x00000a00
134 #define SPIDER_NET_GDADMACCNTR 0x00000a04
135 #define SPIDER_NET_GDACTDPA 0x00000a08
136 #define SPIDER_NET_GDACTDCNT 0x00000a0c
137 #define SPIDER_NET_GDACDBADDR 0x00000a20
138 #define SPIDER_NET_GDACDBSIZE 0x00000a24
139 #define SPIDER_NET_GDACNEXTDA 0x00000a28
140 #define SPIDER_NET_GDACCOMST 0x00000a2c
141 #define SPIDER_NET_GDAWBCOMST 0x00000a30
142 #define SPIDER_NET_GDAWBRSIZE 0x00000a34
143 #define SPIDER_NET_GDAWBVSIZE 0x00000a38
144 #define SPIDER_NET_GDAWBTRST 0x00000a3c
145 #define SPIDER_NET_GDAWBTRERR 0x00000a40
148 #define SPIDER_NET_GDTDCHA 0x00000e00
149 #define SPIDER_NET_GDTDMACCNTR 0x00000e04
150 #define SPIDER_NET_GDTCDPA 0x00000e08
151 #define SPIDER_NET_GDTDMASEL 0x00000e14
153 #define SPIDER_NET_ECMODE 0x00000f00
155 #define SPIDER_NET_CKRCTRL 0x00000ff0
158 #define SPIDER_NET_SCONFIG_IOACTE 0x00002810
161 #define SPIDER_NET_INT0_MASK_VALUE 0x3f7fe2c7
162 #define SPIDER_NET_INT1_MASK_VALUE 0x0000fff2
163 #define SPIDER_NET_INT2_MASK_VALUE 0x000003f1
166 #define SPIDER_NET_FRAMENUM_VALUE 0x00000000
168 #define SPIDER_NET_GFXFRAMES_VALUE 0x00000000
170 #define SPIDER_NET_STOP_SEQ_VALUE 0x00000000
171 #define SPIDER_NET_RUN_SEQ_VALUE 0x0000007e
173 #define SPIDER_NET_PHY_CTRL_VALUE 0x00040040
175 #define SPIDER_NET_RXMODE_VALUE 0x00000011
177 #define SPIDER_NET_TXMODE_VALUE 0x00010000
178 #define SPIDER_NET_RESTART_VALUE 0x00000000
179 #define SPIDER_NET_WOL_VALUE 0x00001111
181 #define SPIDER_NET_WOL_VALUE 0x00000000
183 #define SPIDER_NET_IPSECINIT_VALUE 0x6f716f71
188 #define SPIDER_NET_OPMODE_VALUE 0x00000067
190 #define SPIDER_NET_LENLMT_VALUE 0x00000908
192 #define SPIDER_NET_MACAPAUSE_VALUE 0x00000800
193 #define SPIDER_NET_TXPAUSE_VALUE 0x00000000
195 #define SPIDER_NET_MACMODE_VALUE 0x00000001
196 #define SPIDER_NET_BURSTLMT_VALUE 0x00000200
217 #define SPIDER_NET_DMA_RX_VALUE 0x80000000
218 #define SPIDER_NET_DMA_RX_FEND_VALUE 0x00030003
220 #define SPIDER_NET_TX_DMA_EN 0x80000000
221 #define SPIDER_NET_GDTBSTA 0x00000300
222 #define SPIDER_NET_GDTDCEIDIS 0x00000002
223 #define SPIDER_NET_DMA_TX_VALUE SPIDER_NET_TX_DMA_EN | \
224 SPIDER_NET_GDTDCEIDIS | \
227 #define SPIDER_NET_DMA_TX_FEND_VALUE 0x00030003
230 #define SPIDER_NET_UA_DESCR_VALUE 0x00080000
231 #define SPIDER_NET_PROMISC_VALUE 0x00080000
232 #define SPIDER_NET_NONPROMISC_VALUE 0x00000000
234 #define SPIDER_NET_DMASEL_VALUE 0x00000001
236 #define SPIDER_NET_ECMODE_VALUE 0x00000000
238 #define SPIDER_NET_CKRCTRL_RUN_VALUE 0x1fff010f
239 #define SPIDER_NET_CKRCTRL_STOP_VALUE 0x0000010f
241 #define SPIDER_NET_SBIMSTATE_VALUE 0x00000000
242 #define SPIDER_NET_SBTMSTATE_VALUE 0x00000000
335 #define SPIDER_NET_TXINT (1 << SPIDER_NET_GDTFDCINT)
338 #define SPIDER_NET_RXINT ( (1 << SPIDER_NET_GDAFDCINT) )
340 #define SPIDER_NET_LINKINT ( 1 << SPIDER_NET_GMAC2INT )
342 #define SPIDER_NET_ERRINT ( 0xffffffff & \
343 (~SPIDER_NET_TXINT) & \
344 (~SPIDER_NET_RXINT) & \
345 (~SPIDER_NET_LINKINT) )
347 #define SPIDER_NET_GPREXEC 0x80000000
348 #define SPIDER_NET_GPRDAT_MASK 0x0000ffff
350 #define SPIDER_NET_DMAC_NOINTR_COMPLETE 0x00800000
351 #define SPIDER_NET_DMAC_TXFRMTL 0x00040000
352 #define SPIDER_NET_DMAC_TCP 0x00020000
353 #define SPIDER_NET_DMAC_UDP 0x00030000
354 #define SPIDER_NET_TXDCEST 0x08000000
356 #define SPIDER_NET_DESCR_RXFDIS 0x00000001
357 #define SPIDER_NET_DESCR_RXDCEIS 0x00000002
358 #define SPIDER_NET_DESCR_RXDEN0IS 0x00000004
359 #define SPIDER_NET_DESCR_RXINVDIS 0x00000008
360 #define SPIDER_NET_DESCR_RXRERRIS 0x00000010
361 #define SPIDER_NET_DESCR_RXFDCIMS 0x00000100
362 #define SPIDER_NET_DESCR_RXDCEIMS 0x00000200
363 #define SPIDER_NET_DESCR_RXDEN0IMS 0x00000400
364 #define SPIDER_NET_DESCR_RXINVDIMS 0x00000800
365 #define SPIDER_NET_DESCR_RXRERRMIS 0x00001000
366 #define SPIDER_NET_DESCR_UNUSED 0x077fe0e0
368 #define SPIDER_NET_DESCR_IND_PROC_MASK 0xF0000000
369 #define SPIDER_NET_DESCR_COMPLETE 0x00000000
370 #define SPIDER_NET_DESCR_RESPONSE_ERROR 0x10000000
371 #define SPIDER_NET_DESCR_PROTECTION_ERROR 0x20000000
372 #define SPIDER_NET_DESCR_FRAME_END 0x40000000
373 #define SPIDER_NET_DESCR_FORCE_END 0x50000000
374 #define SPIDER_NET_DESCR_CARDOWNED 0xA0000000
375 #define SPIDER_NET_DESCR_NOT_IN_USE 0xF0000000
376 #define SPIDER_NET_DESCR_TXDESFLG 0x00800000
378 #define SPIDER_NET_DESCR_BAD_STATUS (SPIDER_NET_DESCR_RXDEN0IS | \
379 SPIDER_NET_DESCR_RXRERRIS | \
380 SPIDER_NET_DESCR_RXDEN0IMS | \
381 SPIDER_NET_DESCR_RXINVDIMS | \
382 SPIDER_NET_DESCR_RXRERRMIS | \
383 SPIDER_NET_DESCR_UNUSED)
416 #define SPIDER_NET_RX_IPCHK 29
417 #define SPIDER_NET_RX_TCPCHK 28
418 #define SPIDER_NET_VLAN_PACKET 21
419 #define SPIDER_NET_DATA_STATUS_CKSUM_MASK ( (1 << SPIDER_NET_RX_IPCHK) | \
420 (1 << SPIDER_NET_RX_TCPCHK) )
423 #define SPIDER_NET_RX_IPCHKERR 27
424 #define SPIDER_NET_RX_RXTCPCHKERR 28
426 #define SPIDER_NET_DATA_ERR_CKSUM_MASK (1 << SPIDER_NET_RX_IPCHKERR)
430 #define SPIDER_NET_DESTROY_RX_FLAGS 0x700b8000
432 #define SPIDER_NET_DEFAULT_MSG ( NETIF_MSG_DRV | \
440 NETIF_MSG_TX_QUEUED | \
442 NETIF_MSG_TX_DONE | \
443 NETIF_MSG_RX_STATUS | \
444 NETIF_MSG_PKTDATA | \