Go to the documentation of this file.
153 #define TYPHOON_TYPE_MASK 0x07
154 #define TYPHOON_FRAG_DESC 0x00
155 #define TYPHOON_TX_DESC 0x01
156 #define TYPHOON_CMD_DESC 0x02
157 #define TYPHOON_OPT_DESC 0x03
158 #define TYPHOON_RX_DESC 0x04
159 #define TYPHOON_RESP_DESC 0x05
160 #define TYPHOON_OPT_TYPE_MASK 0xf0
161 #define TYPHOON_OPT_IPSEC 0x00
162 #define TYPHOON_OPT_TCP_SEG 0x10
163 #define TYPHOON_CMD_RESPOND 0x40
164 #define TYPHOON_RESP_ERROR 0x40
165 #define TYPHOON_RX_ERROR 0x40
166 #define TYPHOON_DESC_VALID 0x80
177 #define TYPHOON_TX_PF_NO_CRC cpu_to_le32(0x00000001)
178 #define TYPHOON_TX_PF_IP_CHKSUM cpu_to_le32(0x00000002)
179 #define TYPHOON_TX_PF_TCP_CHKSUM cpu_to_le32(0x00000004)
180 #define TYPHOON_TX_PF_TCP_SEGMENT cpu_to_le32(0x00000008)
181 #define TYPHOON_TX_PF_INSERT_VLAN cpu_to_le32(0x00000010)
182 #define TYPHOON_TX_PF_IPSEC cpu_to_le32(0x00000020)
183 #define TYPHOON_TX_PF_VLAN_PRIORITY cpu_to_le32(0x00000040)
184 #define TYPHOON_TX_PF_UDP_CHKSUM cpu_to_le32(0x00000080)
185 #define TYPHOON_TX_PF_PAD_FRAME cpu_to_le32(0x00000100)
186 #define TYPHOON_TX_PF_RESERVED cpu_to_le32(0x00000e00)
187 #define TYPHOON_TX_PF_VLAN_MASK cpu_to_le32(0x0ffff000)
188 #define TYPHOON_TX_PF_INTERNAL cpu_to_le32(0xf0000000)
189 #define TYPHOON_TX_PF_VLAN_TAG_SHIFT 12
206 #define TYPHOON_TSO_FIRST cpu_to_le16(0x1000)
207 #define TYPHOON_TSO_LAST cpu_to_le16(0x2000)
225 #define TYPHOON_IPSEC_GEN_IV cpu_to_le16(0x0000)
226 #define TYPHOON_IPSEC_USE_IV cpu_to_le16(0x0001)
251 #define TYPHOON_RX_ERR_INTERNAL cpu_to_le32(0x00000000)
252 #define TYPHOON_RX_ERR_FIFO_UNDERRUN cpu_to_le32(0x00000001)
253 #define TYPHOON_RX_ERR_BAD_SSD cpu_to_le32(0x00000002)
254 #define TYPHOON_RX_ERR_RUNT cpu_to_le32(0x00000003)
255 #define TYPHOON_RX_ERR_CRC cpu_to_le32(0x00000004)
256 #define TYPHOON_RX_ERR_OVERSIZE cpu_to_le32(0x00000005)
257 #define TYPHOON_RX_ERR_ALIGN cpu_to_le32(0x00000006)
258 #define TYPHOON_RX_ERR_DRIBBLE cpu_to_le32(0x00000007)
259 #define TYPHOON_RX_PROTO_MASK cpu_to_le32(0x00000003)
260 #define TYPHOON_RX_PROTO_UNKNOWN cpu_to_le32(0x00000000)
261 #define TYPHOON_RX_PROTO_IP cpu_to_le32(0x00000001)
262 #define TYPHOON_RX_PROTO_IPX cpu_to_le32(0x00000002)
263 #define TYPHOON_RX_VLAN cpu_to_le32(0x00000004)
264 #define TYPHOON_RX_IP_FRAG cpu_to_le32(0x00000008)
265 #define TYPHOON_RX_IPSEC cpu_to_le32(0x00000010)
266 #define TYPHOON_RX_IP_CHK_FAIL cpu_to_le32(0x00000020)
267 #define TYPHOON_RX_TCP_CHK_FAIL cpu_to_le32(0x00000040)
268 #define TYPHOON_RX_UDP_CHK_FAIL cpu_to_le32(0x00000080)
269 #define TYPHOON_RX_IP_CHK_GOOD cpu_to_le32(0x00000100)
270 #define TYPHOON_RX_TCP_CHK_GOOD cpu_to_le32(0x00000200)
271 #define TYPHOON_RX_UDP_CHK_GOOD cpu_to_le32(0x00000400)
273 #define TYPHOON_RX_FILTER_MASK cpu_to_le16(0x7fff)
274 #define TYPHOON_RX_FILTERED cpu_to_le16(0x8000)
276 #define TYPHOON_RX_OUTER_AH_GOOD cpu_to_le16(0x0001)
277 #define TYPHOON_RX_OUTER_ESP_GOOD cpu_to_le16(0x0002)
278 #define TYPHOON_RX_INNER_AH_GOOD cpu_to_le16(0x0004)
279 #define TYPHOON_RX_INNER_ESP_GOOD cpu_to_le16(0x0008)
280 #define TYPHOON_RX_OUTER_AH_FAIL cpu_to_le16(0x0010)
281 #define TYPHOON_RX_OUTER_ESP_FAIL cpu_to_le16(0x0020)
282 #define TYPHOON_RX_INNER_AH_FAIL cpu_to_le16(0x0040)
283 #define TYPHOON_RX_INNER_ESP_FAIL cpu_to_le16(0x0080)
284 #define TYPHOON_RX_UNKNOWN_SA cpu_to_le16(0x0100)
285 #define TYPHOON_RX_ESP_FORMAT_ERR cpu_to_le16(0x0200)
321 #define TYPHOON_CMD_TX_ENABLE cpu_to_le16(0x0001)
322 #define TYPHOON_CMD_TX_DISABLE cpu_to_le16(0x0002)
323 #define TYPHOON_CMD_RX_ENABLE cpu_to_le16(0x0003)
324 #define TYPHOON_CMD_RX_DISABLE cpu_to_le16(0x0004)
325 #define TYPHOON_CMD_SET_RX_FILTER cpu_to_le16(0x0005)
326 #define TYPHOON_CMD_READ_STATS cpu_to_le16(0x0007)
327 #define TYPHOON_CMD_XCVR_SELECT cpu_to_le16(0x0013)
328 #define TYPHOON_CMD_SET_MAX_PKT_SIZE cpu_to_le16(0x001a)
329 #define TYPHOON_CMD_READ_MEDIA_STATUS cpu_to_le16(0x001b)
330 #define TYPHOON_CMD_GOTO_SLEEP cpu_to_le16(0x0023)
331 #define TYPHOON_CMD_SET_MULTICAST_HASH cpu_to_le16(0x0025)
332 #define TYPHOON_CMD_SET_MAC_ADDRESS cpu_to_le16(0x0026)
333 #define TYPHOON_CMD_READ_MAC_ADDRESS cpu_to_le16(0x0027)
334 #define TYPHOON_CMD_VLAN_TYPE_WRITE cpu_to_le16(0x002b)
335 #define TYPHOON_CMD_CREATE_SA cpu_to_le16(0x0034)
336 #define TYPHOON_CMD_DELETE_SA cpu_to_le16(0x0035)
337 #define TYPHOON_CMD_READ_VERSIONS cpu_to_le16(0x0043)
338 #define TYPHOON_CMD_IRQ_COALESCE_CTRL cpu_to_le16(0x0045)
339 #define TYPHOON_CMD_ENABLE_WAKE_EVENTS cpu_to_le16(0x0049)
340 #define TYPHOON_CMD_SET_OFFLOAD_TASKS cpu_to_le16(0x004f)
341 #define TYPHOON_CMD_HELLO_RESP cpu_to_le16(0x0057)
342 #define TYPHOON_CMD_HALT cpu_to_le16(0x005d)
343 #define TYPHOON_CMD_READ_IPSEC_INFO cpu_to_le16(0x005e)
344 #define TYPHOON_CMD_GET_IPSEC_ENABLE cpu_to_le16(0x0067)
345 #define TYPHOON_CMD_GET_CMD_LVL cpu_to_le16(0x0069)
364 #define INIT_COMMAND_NO_RESPONSE(x, command) \
365 do { struct cmd_desc *_ptr = (x); \
366 memset(_ptr, 0, sizeof(struct cmd_desc)); \
367 _ptr->flags = TYPHOON_CMD_DESC | TYPHOON_DESC_VALID; \
368 _ptr->cmd = command; \
372 #define INIT_COMMAND_WITH_RESPONSE(x, command) \
373 do { struct cmd_desc *_ptr = (x); \
374 memset(_ptr, 0, sizeof(struct cmd_desc)); \
375 _ptr->flags = TYPHOON_CMD_RESPOND | TYPHOON_CMD_DESC; \
376 _ptr->flags |= TYPHOON_DESC_VALID; \
377 _ptr->cmd = command; \
383 #define TYPHOON_RX_FILTER_DIRECTED cpu_to_le16(0x0001)
384 #define TYPHOON_RX_FILTER_ALL_MCAST cpu_to_le16(0x0002)
385 #define TYPHOON_RX_FILTER_BROADCAST cpu_to_le16(0x0004)
386 #define TYPHOON_RX_FILTER_PROMISCOUS cpu_to_le16(0x0008)
387 #define TYPHOON_RX_FILTER_MCAST_HASH cpu_to_le16(0x0010)
419 #define TYPHOON_LINK_STAT_MASK cpu_to_le32(0x00000001)
420 #define TYPHOON_LINK_GOOD cpu_to_le32(0x00000001)
421 #define TYPHOON_LINK_BAD cpu_to_le32(0x00000000)
422 #define TYPHOON_LINK_SPEED_MASK cpu_to_le32(0x00000002)
423 #define TYPHOON_LINK_100MBPS cpu_to_le32(0x00000002)
424 #define TYPHOON_LINK_10MBPS cpu_to_le32(0x00000000)
425 #define TYPHOON_LINK_DUPLEX_MASK cpu_to_le32(0x00000004)
426 #define TYPHOON_LINK_FULL_DUPLEX cpu_to_le32(0x00000004)
427 #define TYPHOON_LINK_HALF_DUPLEX cpu_to_le32(0x00000000)
434 #define TYPHOON_XCVR_10HALF cpu_to_le16(0x0000)
435 #define TYPHOON_XCVR_10FULL cpu_to_le16(0x0001)
436 #define TYPHOON_XCVR_100HALF cpu_to_le16(0x0002)
437 #define TYPHOON_XCVR_100FULL cpu_to_le16(0x0003)
438 #define TYPHOON_XCVR_AUTONEG cpu_to_le16(0x0004)
442 #define TYPHOON_MEDIA_STAT_CRC_STRIP_DISABLE cpu_to_le16(0x0004)
443 #define TYPHOON_MEDIA_STAT_COLLISION_DETECT cpu_to_le16(0x0010)
444 #define TYPHOON_MEDIA_STAT_CARRIER_SENSE cpu_to_le16(0x0020)
445 #define TYPHOON_MEDIA_STAT_POLARITY_REV cpu_to_le16(0x0400)
446 #define TYPHOON_MEDIA_STAT_NO_LINK cpu_to_le16(0x0800)
450 #define TYPHOON_MCAST_HASH_DISABLE cpu_to_le16(0x0000)
451 #define TYPHOON_MCAST_HASH_ENABLE cpu_to_le16(0x0001)
452 #define TYPHOON_MCAST_HASH_SET cpu_to_le16(0x0002)
462 #define TYPHOON_SA_MODE_NULL cpu_to_le16(0x0000)
463 #define TYPHOON_SA_MODE_AH cpu_to_le16(0x0001)
464 #define TYPHOON_SA_MODE_ESP cpu_to_le16(0x0002)
466 #define TYPHOON_SA_HASH_ENABLE 0x01
467 #define TYPHOON_SA_HASH_SHA1 0x02
468 #define TYPHOON_SA_HASH_MD5 0x04
470 #define TYPHOON_SA_DIR_RX 0x00
471 #define TYPHOON_SA_DIR_TX 0x01
473 #define TYPHOON_SA_ENCRYPT_ENABLE 0x01
474 #define TYPHOON_SA_ENCRYPT_DES 0x02
475 #define TYPHOON_SA_ENCRYPT_3DES 0x00
476 #define TYPHOON_SA_ENCRYPT_3DES_2KEY 0x00
477 #define TYPHOON_SA_ENCRYPT_3DES_3KEY 0x04
478 #define TYPHOON_SA_ENCRYPT_CBC 0x08
479 #define TYPHOON_SA_ENCRYPT_ECB 0x00
481 #define TYPHOON_SA_SPECIFY_INDEX 0x01
482 #define TYPHOON_SA_GENERATE_INDEX 0x00
496 #define TYPHOON_OFFLOAD_TCP_CHKSUM cpu_to_le32(0x00000002)
497 #define TYPHOON_OFFLOAD_UDP_CHKSUM cpu_to_le32(0x00000004)
498 #define TYPHOON_OFFLOAD_IP_CHKSUM cpu_to_le32(0x00000008)
499 #define TYPHOON_OFFLOAD_IPSEC cpu_to_le32(0x00000010)
500 #define TYPHOON_OFFLOAD_BCAST_THROTTLE cpu_to_le32(0x00000020)
501 #define TYPHOON_OFFLOAD_DHCP_PREVENT cpu_to_le32(0x00000040)
502 #define TYPHOON_OFFLOAD_VLAN cpu_to_le32(0x00000080)
503 #define TYPHOON_OFFLOAD_FILTERING cpu_to_le32(0x00000100)
504 #define TYPHOON_OFFLOAD_TCP_SEGMENT cpu_to_le32(0x00000200)
508 #define TYPHOON_WAKE_MAGIC_PKT cpu_to_le16(0x01)
509 #define TYPHOON_WAKE_LINK_EVENT cpu_to_le16(0x02)
510 #define TYPHOON_WAKE_ICMP_ECHO cpu_to_le16(0x04)
511 #define TYPHOON_WAKE_ARP cpu_to_le16(0x08)
532 #define TYPHOON_REG_SOFT_RESET 0x00
533 #define TYPHOON_REG_INTR_STATUS 0x04
534 #define TYPHOON_REG_INTR_ENABLE 0x08
535 #define TYPHOON_REG_INTR_MASK 0x0c
536 #define TYPHOON_REG_SELF_INTERRUPT 0x10
537 #define TYPHOON_REG_HOST2ARM7 0x14
538 #define TYPHOON_REG_HOST2ARM6 0x18
539 #define TYPHOON_REG_HOST2ARM5 0x1c
540 #define TYPHOON_REG_HOST2ARM4 0x20
541 #define TYPHOON_REG_HOST2ARM3 0x24
542 #define TYPHOON_REG_HOST2ARM2 0x28
543 #define TYPHOON_REG_HOST2ARM1 0x2c
544 #define TYPHOON_REG_HOST2ARM0 0x30
545 #define TYPHOON_REG_ARM2HOST3 0x34
546 #define TYPHOON_REG_ARM2HOST2 0x38
547 #define TYPHOON_REG_ARM2HOST1 0x3c
548 #define TYPHOON_REG_ARM2HOST0 0x40
550 #define TYPHOON_REG_BOOT_DATA_LO TYPHOON_REG_HOST2ARM5
551 #define TYPHOON_REG_BOOT_DATA_HI TYPHOON_REG_HOST2ARM4
552 #define TYPHOON_REG_BOOT_DEST_ADDR TYPHOON_REG_HOST2ARM3
553 #define TYPHOON_REG_BOOT_CHECKSUM TYPHOON_REG_HOST2ARM2
554 #define TYPHOON_REG_BOOT_LENGTH TYPHOON_REG_HOST2ARM1
556 #define TYPHOON_REG_DOWNLOAD_BOOT_ADDR TYPHOON_REG_HOST2ARM1
557 #define TYPHOON_REG_DOWNLOAD_HMAC_0 TYPHOON_REG_HOST2ARM2
558 #define TYPHOON_REG_DOWNLOAD_HMAC_1 TYPHOON_REG_HOST2ARM3
559 #define TYPHOON_REG_DOWNLOAD_HMAC_2 TYPHOON_REG_HOST2ARM4
560 #define TYPHOON_REG_DOWNLOAD_HMAC_3 TYPHOON_REG_HOST2ARM5
561 #define TYPHOON_REG_DOWNLOAD_HMAC_4 TYPHOON_REG_HOST2ARM6
563 #define TYPHOON_REG_BOOT_RECORD_ADDR_HI TYPHOON_REG_HOST2ARM2
564 #define TYPHOON_REG_BOOT_RECORD_ADDR_LO TYPHOON_REG_HOST2ARM1
566 #define TYPHOON_REG_TX_LO_READY TYPHOON_REG_HOST2ARM3
567 #define TYPHOON_REG_CMD_READY TYPHOON_REG_HOST2ARM2
568 #define TYPHOON_REG_TX_HI_READY TYPHOON_REG_HOST2ARM1
570 #define TYPHOON_REG_COMMAND TYPHOON_REG_HOST2ARM0
571 #define TYPHOON_REG_HEARTBEAT TYPHOON_REG_ARM2HOST3
572 #define TYPHOON_REG_STATUS TYPHOON_REG_ARM2HOST0
576 #define TYPHOON_RESET_ALL 0x7f
577 #define TYPHOON_RESET_NONE 0x00
587 #define TYPHOON_INTR_HOST_INT 0x00000001
588 #define TYPHOON_INTR_ARM2HOST0 0x00000002
589 #define TYPHOON_INTR_ARM2HOST1 0x00000004
590 #define TYPHOON_INTR_ARM2HOST2 0x00000008
591 #define TYPHOON_INTR_ARM2HOST3 0x00000010
592 #define TYPHOON_INTR_DMA0 0x00000020
593 #define TYPHOON_INTR_DMA1 0x00000040
594 #define TYPHOON_INTR_DMA2 0x00000080
595 #define TYPHOON_INTR_DMA3 0x00000100
596 #define TYPHOON_INTR_MASTER_ABORT 0x00000200
597 #define TYPHOON_INTR_TARGET_ABORT 0x00000400
598 #define TYPHOON_INTR_SELF 0x00000800
599 #define TYPHOON_INTR_RESERVED 0xfffff000
601 #define TYPHOON_INTR_BOOTCMD TYPHOON_INTR_ARM2HOST0
603 #define TYPHOON_INTR_ENABLE_ALL 0xffffffef
604 #define TYPHOON_INTR_ALL 0xffffffff
605 #define TYPHOON_INTR_NONE 0x00000000
609 #define TYPHOON_BOOTCMD_BOOT 0x00
610 #define TYPHOON_BOOTCMD_WAKEUP 0xfa
611 #define TYPHOON_BOOTCMD_DNLD_COMPLETE 0xfb
612 #define TYPHOON_BOOTCMD_SEG_AVAILABLE 0xfc
613 #define TYPHOON_BOOTCMD_RUNTIME_IMAGE 0xfd
614 #define TYPHOON_BOOTCMD_REG_BOOT_RECORD 0xff
618 #define TYPHOON_STATUS_WAITING_FOR_BOOT 0x07
619 #define TYPHOON_STATUS_SECOND_INIT 0x08
620 #define TYPHOON_STATUS_RUNNING 0x09
621 #define TYPHOON_STATUS_WAITING_FOR_HOST 0x0d
622 #define TYPHOON_STATUS_WAITING_FOR_SEGMENT 0x10
623 #define TYPHOON_STATUS_SLEEPING 0x11
624 #define TYPHOON_STATUS_HALTED 0x14