Go to the documentation of this file.
32 #include <linux/module.h>
33 #include <linux/ethtool.h>
35 #include <linux/if_vlan.h>
40 #define DRV_NAME "ehea"
41 #define DRV_VERSION "EHEA_0107"
44 #define DLPAR_PORT_ADD_REM 1
45 #define DLPAR_MEM_ADD 2
46 #define DLPAR_MEM_REM 4
47 #define EHEA_CAPABILITIES (DLPAR_PORT_ADD_REM | DLPAR_MEM_ADD | DLPAR_MEM_REM)
49 #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \
50 | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
52 #define EHEA_MAX_ENTRIES_RQ1 32767
53 #define EHEA_MAX_ENTRIES_RQ2 16383
54 #define EHEA_MAX_ENTRIES_RQ3 16383
55 #define EHEA_MAX_ENTRIES_SQ 32767
56 #define EHEA_MIN_ENTRIES_QP 127
58 #define EHEA_SMALL_QUEUES
60 #ifdef EHEA_SMALL_QUEUES
61 #define EHEA_MAX_CQE_COUNT 1023
62 #define EHEA_DEF_ENTRIES_SQ 1023
63 #define EHEA_DEF_ENTRIES_RQ1 1023
64 #define EHEA_DEF_ENTRIES_RQ2 1023
65 #define EHEA_DEF_ENTRIES_RQ3 511
67 #define EHEA_MAX_CQE_COUNT 4080
68 #define EHEA_DEF_ENTRIES_SQ 4080
69 #define EHEA_DEF_ENTRIES_RQ1 8160
70 #define EHEA_DEF_ENTRIES_RQ2 2040
71 #define EHEA_DEF_ENTRIES_RQ3 2040
74 #define EHEA_MAX_ENTRIES_EQ 20
81 #define EHEA_MAX_PACKET_SIZE 9022
82 #define EHEA_RQ2_PKT_SIZE 2048
83 #define EHEA_L_PKT_SIZE 256
88 #define EHEA_PD_ID 0xaabcdeff
90 #define EHEA_RQ2_THRESHOLD 1
91 #define EHEA_RQ3_THRESHOLD 4
93 #define EHEA_SPEED_10G 10000
94 #define EHEA_SPEED_1G 1000
95 #define EHEA_SPEED_100M 100
96 #define EHEA_SPEED_10M 10
97 #define EHEA_SPEED_AUTONEG 0
100 #define EHEA_BCMC_SCOPE_ALL 0x08
101 #define EHEA_BCMC_SCOPE_SINGLE 0x00
102 #define EHEA_BCMC_MULTICAST 0x04
103 #define EHEA_BCMC_BROADCAST 0x00
104 #define EHEA_BCMC_UNTAGGED 0x02
105 #define EHEA_BCMC_TAGGED 0x00
106 #define EHEA_BCMC_VLANID_ALL 0x01
107 #define EHEA_BCMC_VLANID_SINGLE 0x00
109 #define EHEA_CACHE_LINE 128
112 #define EHEA_MR_ACC_CTRL 0x00800000
114 #define EHEA_BUSMAP_START 0x8000000000000000ULL
115 #define EHEA_INVAL_ADDR 0xFFFFFFFFFFFFFFFFULL
116 #define EHEA_DIR_INDEX_SHIFT 13
117 #define EHEA_TOP_INDEX_SHIFT (EHEA_DIR_INDEX_SHIFT * 2)
118 #define EHEA_MAP_ENTRIES (1 << EHEA_DIR_INDEX_SHIFT)
119 #define EHEA_MAP_SIZE (0x10000)
120 #define EHEA_INDEX_MASK (EHEA_MAP_ENTRIES - 1)
123 #define EHEA_WATCH_DOG_TIMEOUT 10*HZ
129 #define EHEA_BMASK(pos, length) (((pos) << 16) + (length))
131 #define EHEA_BMASK_IBM(from, to) (((63 - to) << 16) + ((to) - (from) + 1))
133 #define EHEA_BMASK_SHIFTPOS(mask) (((mask) >> 16) & 0xffff)
135 #define EHEA_BMASK_MASK(mask) \
136 (0xffffffffffffffffULL >> ((64 - (mask)) & 0xffff))
138 #define EHEA_BMASK_SET(mask, value) \
139 ((EHEA_BMASK_MASK(mask) & ((u64)(value))) << EHEA_BMASK_SHIFTPOS(mask))
141 #define EHEA_BMASK_GET(mask, value) \
142 (EHEA_BMASK_MASK(mask) & (((u64)(value)) >> EHEA_BMASK_SHIFTPOS(mask)))
340 #define EHEA_IRQ_NAME_SIZE 20
384 #define EHEA_MAX_PORTS 16
386 #define EHEA_NUM_PORTRES_FW_HANDLES 6
389 #define EHEA_NUM_PORT_FW_HANDLES 1
390 #define EHEA_NUM_ADAPTER_FW_HANDLES 2
436 #define EHEA_PORT_UP 1
437 #define EHEA_PORT_DOWN 0
438 #define EHEA_PHY_LINK_UP 1
439 #define EHEA_PHY_LINK_DOWN 0
440 #define EHEA_MAX_PORT_RES 16