Go to the documentation of this file.
41 #ifndef __SLIC_DRIVER_H__
42 #define __SLIC_DRIVER_H__
45 #define OASIS_UCODE_VERS_STRING "1.2"
46 #define OASIS_UCODE_VERS_DATE "2006/03/27 15:10:37"
47 #define OASIS_UCODE_HOSTIF_ID 3
49 #define MOJAVE_UCODE_VERS_STRING "1.2"
50 #define MOJAVE_UCODE_VERS_DATE "2006/03/27 15:12:22"
51 #define MOJAVE_UCODE_HOSTIF_ID 3
53 #define GB_RCVUCODE_VERS_STRING "1.2"
54 #define GB_RCVUCODE_VERS_DATE "2006/03/27 15:12:15"
55 static u32 OasisRcvUCodeLen = 512;
56 static u32 GBRcvUCodeLen = 512;
57 #define SECTION_SIZE 65536
64 #define SLIC_RSPQ_PAGES_GB 10
65 #define SLIC_RSPQ_BUFSINPAGE (PAGE_SIZE / SLIC_RSPBUF_SIZE)
76 #define SLIC_RCVQ_EXPANSION 1
77 #define SLIC_RCVQ_ENTRIES (256 * SLIC_RCVQ_EXPANSION)
78 #define SLIC_RCVQ_MINENTRIES (SLIC_RCVQ_ENTRIES / 2)
79 #define SLIC_RCVQ_MAX_PROCESS_ISR ((SLIC_RCVQ_ENTRIES * 4))
80 #define SLIC_RCVQ_RCVBUFSIZE 2048
81 #define SLIC_RCVQ_FILLENTRIES (16 * SLIC_RCVQ_EXPANSION)
82 #define SLIC_RCVQ_FILLTHRESH (SLIC_RCVQ_ENTRIES - SLIC_RCVQ_FILLENTRIES)
124 #define SLIC_HANDLE_FREE 0x0000
125 #define SLIC_HANDLE_DATA 0x0001
126 #define SLIC_HANDLE_CMD 0x0002
127 #define SLIC_HANDLE_CONTEXT 0x0003
128 #define SLIC_HANDLE_TEAM 0x0004
130 #define handle_index handle.parts.index
131 #define handle_bottom handle.parts.bottombits
132 #define handle_token handle.whole
134 #define SLIC_HOSTCMD_SIZE 512
150 #define SLIC_CMDQ_CMDSINPAGE (PAGE_SIZE / SLIC_HOSTCMD_SIZE)
151 #define SLIC_CMD_DUMB 3
152 #define SLIC_CMDQ_INITCMDS 256
153 #define SLIC_CMDQ_MAXCMDS 256
154 #define SLIC_CMDQ_MAXOUTSTAND SLIC_CMDQ_MAXCMDS
155 #define SLIC_CMDQ_MAXPAGES (SLIC_CMDQ_MAXCMDS / SLIC_CMDQ_CMDSINPAGE)
156 #define SLIC_CMDQ_INITPAGES (SLIC_CMDQ_INITCMDS / SLIC_CMDQ_CMDSINPAGE)
171 #define SLIC_MAX_CARDS 32
172 #define SLIC_MAX_PORTS 4
180 #define CARD_DOWN 0x00000000
181 #define CARD_UP 0x00000001
182 #define CARD_FAIL 0x00000002
183 #define CARD_DIAG 0x00000003
184 #define CARD_SLEEP 0x00000004
186 #define ADAPT_DOWN 0x00
187 #define ADAPT_UP 0x01
188 #define ADAPT_FAIL 0x02
189 #define ADAPT_RESET 0x03
190 #define ADAPT_SLEEP 0x04
192 #define ADAPT_FLAGS_BOOTTIME 0x0001
193 #define ADAPT_FLAGS_IS64BIT 0x0002
194 #define ADAPT_FLAGS_PENDINGLINKDOWN 0x0004
195 #define ADAPT_FLAGS_FIBERMEDIA 0x0008
196 #define ADAPT_FLAGS_LOCKS_ALLOCED 0x0010
197 #define ADAPT_FLAGS_INT_REGISTERED 0x0020
198 #define ADAPT_FLAGS_LOAD_TIMER_SET 0x0040
199 #define ADAPT_FLAGS_STATS_TIMER_SET 0x0080
200 #define ADAPT_FLAGS_RESET_TIMER_SET 0x0100
202 #define LINK_DOWN 0x00
203 #define LINK_CONFIG 0x01
206 #define LINK_10MB 0x00
207 #define LINK_100MB 0x01
208 #define LINK_AUTOSPEED 0x02
209 #define LINK_1000MB 0x03
210 #define LINK_10000MB 0x04
212 #define LINK_HALFD 0x00
213 #define LINK_FULLD 0x01
214 #define LINK_AUTOD 0x02
216 #define MAC_DIRECTED 0x00000001
217 #define MAC_BCAST 0x00000002
218 #define MAC_MCAST 0x00000004
219 #define MAC_PROMISC 0x00000008
220 #define MAC_LOOPBACK 0x00000010
221 #define MAC_ALLMCAST 0x00000020
223 #define SLIC_DUPLEX(x) ((x == LINK_FULLD) ? "FDX" : "HDX")
224 #define SLIC_SPEED(x) ((x == LINK_100MB) ? "100Mb" : ((x == LINK_1000MB) ?\
226 #define SLIC_LINKSTATE(x) ((x == LINK_DOWN) ? "Down" : "Up ")
227 #define SLIC_ADAPTER_STATE(x) ((x == ADAPT_UP) ? "UP" : "Down")
228 #define SLIC_CARD_STATE(x) ((x == CARD_UP) ? "UP" : "Down")
262 #define SLIC_LOADTIMER_PERIOD 1
263 #define SLIC_INTAGG_DEFAULT 200
264 #define SLIC_LOAD_0 0
265 #define SLIC_INTAGG_0 0
266 #define SLIC_LOAD_1 8000
267 #define SLIC_LOAD_2 10000
268 #define SLIC_LOAD_3 12000
269 #define SLIC_LOAD_4 14000
270 #define SLIC_LOAD_5 16000
271 #define SLIC_INTAGG_1 50
272 #define SLIC_INTAGG_2 100
273 #define SLIC_INTAGG_3 150
274 #define SLIC_INTAGG_4 200
275 #define SLIC_INTAGG_5 250
276 #define SLIC_LOAD_1GB 3000
277 #define SLIC_LOAD_2GB 6000
278 #define SLIC_LOAD_3GB 12000
279 #define SLIC_LOAD_4GB 24000
280 #define SLIC_LOAD_5GB 48000
281 #define SLIC_INTAGG_1GB 50
282 #define SLIC_INTAGG_2GB 75
283 #define SLIC_INTAGG_3GB 100
284 #define SLIC_INTAGG_4GB 100
285 #define SLIC_INTAGG_5GB 100
335 #define NUM_CFG_SPACES 2
336 #define NUM_CFG_REGS 64
337 #define NUM_CFG_REG_ULONGS (NUM_CFG_REGS / sizeof(u32))
505 #define UPDATE_STATS(largestat, newstat, oldstat) \
507 if ((newstat) < (oldstat)) \
508 (largestat) += ((newstat) + (0xFFFFFFFF - oldstat + 1)); \
510 (largestat) += ((newstat) - (oldstat)); \
513 #define UPDATE_STATS_GB(largestat, newstat, oldstat) \
515 (largestat) += ((newstat) - (oldstat)); \
518 #if BITS_PER_LONG == 64
519 #define SLIC_GET_ADDR_LOW(_addr) (u32)((u64)(_addr) & \
521 #define SLIC_GET_ADDR_HIGH(_addr) (u32)(((u64)(_addr) >> 32) & \
523 #elif BITS_PER_LONG == 32
524 #define SLIC_GET_ADDR_LOW(_addr) (u32)(_addr)
525 #define SLIC_GET_ADDR_HIGH(_addr) (u32)0
527 #error BITS_PER_LONG must be 32 or 64
531 #define DONT_FLUSH false
533 #define SIOCSLICDUMPCARD (SIOCDEVPRIVATE+9)
534 #define SIOCSLICSETINTAGG (SIOCDEVPRIVATE+10)
535 #define SIOCSLICTRACEDUMP (SIOCDEVPRIVATE+11)