diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/net/bnx2x/bnx2x_hsi.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_hsi.h')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_hsi.h | 2228 |
1 files changed, 1411 insertions, 817 deletions
diff --git a/drivers/net/bnx2x/bnx2x_hsi.h b/drivers/net/bnx2x/bnx2x_hsi.h index fd1f29e0317d..cdf19fe7c7f6 100644 --- a/drivers/net/bnx2x/bnx2x_hsi.h +++ b/drivers/net/bnx2x/bnx2x_hsi.h | |||
@@ -1,26 +1,37 @@ | |||
1 | /* bnx2x_hsi.h: Broadcom Everest network driver. | 1 | /* bnx2x_hsi.h: Broadcom Everest network driver. |
2 | * | 2 | * |
3 | * Copyright (c) 2007-2010 Broadcom Corporation | 3 | * Copyright (c) 2007-2011 Broadcom Corporation |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation. | 7 | * the Free Software Foundation. |
8 | */ | 8 | */ |
9 | #ifndef BNX2X_HSI_H | ||
10 | #define BNX2X_HSI_H | ||
11 | |||
12 | #include "bnx2x_fw_defs.h" | ||
13 | |||
14 | #define FW_ENCODE_32BIT_PATTERN 0x1e1e1e1e | ||
9 | 15 | ||
10 | struct license_key { | 16 | struct license_key { |
11 | u32 reserved[6]; | 17 | u32 reserved[6]; |
12 | 18 | ||
13 | #if defined(__BIG_ENDIAN) | 19 | u32 max_iscsi_conn; |
14 | u16 max_iscsi_init_conn; | 20 | #define BNX2X_MAX_ISCSI_TRGT_CONN_MASK 0xFFFF |
15 | u16 max_iscsi_trgt_conn; | 21 | #define BNX2X_MAX_ISCSI_TRGT_CONN_SHIFT 0 |
16 | #elif defined(__LITTLE_ENDIAN) | 22 | #define BNX2X_MAX_ISCSI_INIT_CONN_MASK 0xFFFF0000 |
17 | u16 max_iscsi_trgt_conn; | 23 | #define BNX2X_MAX_ISCSI_INIT_CONN_SHIFT 16 |
18 | u16 max_iscsi_init_conn; | ||
19 | #endif | ||
20 | 24 | ||
21 | u32 reserved_a[6]; | 25 | u32 reserved_a; |
22 | }; | 26 | |
27 | u32 max_fcoe_conn; | ||
28 | #define BNX2X_MAX_FCOE_TRGT_CONN_MASK 0xFFFF | ||
29 | #define BNX2X_MAX_FCOE_TRGT_CONN_SHIFT 0 | ||
30 | #define BNX2X_MAX_FCOE_INIT_CONN_MASK 0xFFFF0000 | ||
31 | #define BNX2X_MAX_FCOE_INIT_CONN_SHIFT 16 | ||
23 | 32 | ||
33 | u32 reserved_b[4]; | ||
34 | }; | ||
24 | 35 | ||
25 | #define PORT_0 0 | 36 | #define PORT_0 0 |
26 | #define PORT_1 1 | 37 | #define PORT_1 1 |
@@ -78,6 +89,8 @@ struct shared_hw_cfg { /* NVRAM Offset */ | |||
78 | #define SHARED_HW_CFG_LED_PHY11 0x000b0000 | 89 | #define SHARED_HW_CFG_LED_PHY11 0x000b0000 |
79 | #define SHARED_HW_CFG_LED_MAC4 0x000c0000 | 90 | #define SHARED_HW_CFG_LED_MAC4 0x000c0000 |
80 | #define SHARED_HW_CFG_LED_PHY8 0x000d0000 | 91 | #define SHARED_HW_CFG_LED_PHY8 0x000d0000 |
92 | #define SHARED_HW_CFG_LED_EXTPHY1 0x000e0000 | ||
93 | |||
81 | 94 | ||
82 | #define SHARED_HW_CFG_AN_ENABLE_MASK 0x3f000000 | 95 | #define SHARED_HW_CFG_AN_ENABLE_MASK 0x3f000000 |
83 | #define SHARED_HW_CFG_AN_ENABLE_SHIFT 24 | 96 | #define SHARED_HW_CFG_AN_ENABLE_SHIFT 24 |
@@ -120,6 +133,23 @@ struct shared_hw_cfg { /* NVRAM Offset */ | |||
120 | #define SHARED_HW_CFG_FAN_FAILURE_DISABLED 0x00080000 | 133 | #define SHARED_HW_CFG_FAN_FAILURE_DISABLED 0x00080000 |
121 | #define SHARED_HW_CFG_FAN_FAILURE_ENABLED 0x00100000 | 134 | #define SHARED_HW_CFG_FAN_FAILURE_ENABLED 0x00100000 |
122 | 135 | ||
136 | /* Set the MDC/MDIO access for the first external phy */ | ||
137 | #define SHARED_HW_CFG_MDC_MDIO_ACCESS1_MASK 0x1C000000 | ||
138 | #define SHARED_HW_CFG_MDC_MDIO_ACCESS1_SHIFT 26 | ||
139 | #define SHARED_HW_CFG_MDC_MDIO_ACCESS1_PHY_TYPE 0x00000000 | ||
140 | #define SHARED_HW_CFG_MDC_MDIO_ACCESS1_EMAC0 0x04000000 | ||
141 | #define SHARED_HW_CFG_MDC_MDIO_ACCESS1_EMAC1 0x08000000 | ||
142 | #define SHARED_HW_CFG_MDC_MDIO_ACCESS1_BOTH 0x0c000000 | ||
143 | #define SHARED_HW_CFG_MDC_MDIO_ACCESS1_SWAPPED 0x10000000 | ||
144 | |||
145 | /* Set the MDC/MDIO access for the second external phy */ | ||
146 | #define SHARED_HW_CFG_MDC_MDIO_ACCESS2_MASK 0xE0000000 | ||
147 | #define SHARED_HW_CFG_MDC_MDIO_ACCESS2_SHIFT 29 | ||
148 | #define SHARED_HW_CFG_MDC_MDIO_ACCESS2_PHY_TYPE 0x00000000 | ||
149 | #define SHARED_HW_CFG_MDC_MDIO_ACCESS2_EMAC0 0x20000000 | ||
150 | #define SHARED_HW_CFG_MDC_MDIO_ACCESS2_EMAC1 0x40000000 | ||
151 | #define SHARED_HW_CFG_MDC_MDIO_ACCESS2_BOTH 0x60000000 | ||
152 | #define SHARED_HW_CFG_MDC_MDIO_ACCESS2_SWAPPED 0x80000000 | ||
123 | u32 power_dissipated; /* 0x11c */ | 153 | u32 power_dissipated; /* 0x11c */ |
124 | #define SHARED_HW_CFG_POWER_DIS_CMN_MASK 0xff000000 | 154 | #define SHARED_HW_CFG_POWER_DIS_CMN_MASK 0xff000000 |
125 | #define SHARED_HW_CFG_POWER_DIS_CMN_SHIFT 24 | 155 | #define SHARED_HW_CFG_POWER_DIS_CMN_SHIFT 24 |
@@ -214,18 +244,191 @@ struct port_hw_cfg { /* port 0: 0x12c port 1: 0x2bc */ | |||
214 | #define PORT_HW_CFG_SERDES_RX_DRV_EQUALIZER_SHIFT 16 | 244 | #define PORT_HW_CFG_SERDES_RX_DRV_EQUALIZER_SHIFT 16 |
215 | 245 | ||
216 | 246 | ||
217 | u32 Reserved0[16]; /* 0x158 */ | 247 | u32 Reserved0[3]; /* 0x158 */ |
218 | 248 | /* Controls the TX laser of the SFP+ module */ | |
249 | u32 sfp_ctrl; /* 0x164 */ | ||
250 | #define PORT_HW_CFG_TX_LASER_MASK 0x000000FF | ||
251 | #define PORT_HW_CFG_TX_LASER_SHIFT 0 | ||
252 | #define PORT_HW_CFG_TX_LASER_MDIO 0x00000000 | ||
253 | #define PORT_HW_CFG_TX_LASER_GPIO0 0x00000001 | ||
254 | #define PORT_HW_CFG_TX_LASER_GPIO1 0x00000002 | ||
255 | #define PORT_HW_CFG_TX_LASER_GPIO2 0x00000003 | ||
256 | #define PORT_HW_CFG_TX_LASER_GPIO3 0x00000004 | ||
257 | |||
258 | /* Controls the fault module LED of the SFP+ */ | ||
259 | #define PORT_HW_CFG_FAULT_MODULE_LED_MASK 0x0000FF00 | ||
260 | #define PORT_HW_CFG_FAULT_MODULE_LED_SHIFT 8 | ||
261 | #define PORT_HW_CFG_FAULT_MODULE_LED_GPIO0 0x00000000 | ||
262 | #define PORT_HW_CFG_FAULT_MODULE_LED_GPIO1 0x00000100 | ||
263 | #define PORT_HW_CFG_FAULT_MODULE_LED_GPIO2 0x00000200 | ||
264 | #define PORT_HW_CFG_FAULT_MODULE_LED_GPIO3 0x00000300 | ||
265 | #define PORT_HW_CFG_FAULT_MODULE_LED_DISABLED 0x00000400 | ||
266 | u32 Reserved01[12]; /* 0x158 */ | ||
219 | /* for external PHY, or forced mode or during AN */ | 267 | /* for external PHY, or forced mode or during AN */ |
220 | u16 xgxs_config_rx[4]; /* 0x198 */ | 268 | u16 xgxs_config_rx[4]; /* 0x198 */ |
221 | 269 | ||
222 | u16 xgxs_config_tx[4]; /* 0x1A0 */ | 270 | u16 xgxs_config_tx[4]; /* 0x1A0 */ |
223 | 271 | ||
224 | u32 Reserved1[64]; /* 0x1A8 */ | 272 | u32 Reserved1[56]; /* 0x1A8 */ |
273 | u32 default_cfg; /* 0x288 */ | ||
274 | #define PORT_HW_CFG_GPIO0_CONFIG_MASK 0x00000003 | ||
275 | #define PORT_HW_CFG_GPIO0_CONFIG_SHIFT 0 | ||
276 | #define PORT_HW_CFG_GPIO0_CONFIG_NA 0x00000000 | ||
277 | #define PORT_HW_CFG_GPIO0_CONFIG_LOW 0x00000001 | ||
278 | #define PORT_HW_CFG_GPIO0_CONFIG_HIGH 0x00000002 | ||
279 | #define PORT_HW_CFG_GPIO0_CONFIG_INPUT 0x00000003 | ||
280 | |||
281 | #define PORT_HW_CFG_GPIO1_CONFIG_MASK 0x0000000C | ||
282 | #define PORT_HW_CFG_GPIO1_CONFIG_SHIFT 2 | ||
283 | #define PORT_HW_CFG_GPIO1_CONFIG_NA 0x00000000 | ||
284 | #define PORT_HW_CFG_GPIO1_CONFIG_LOW 0x00000004 | ||
285 | #define PORT_HW_CFG_GPIO1_CONFIG_HIGH 0x00000008 | ||
286 | #define PORT_HW_CFG_GPIO1_CONFIG_INPUT 0x0000000c | ||
287 | |||
288 | #define PORT_HW_CFG_GPIO2_CONFIG_MASK 0x00000030 | ||
289 | #define PORT_HW_CFG_GPIO2_CONFIG_SHIFT 4 | ||
290 | #define PORT_HW_CFG_GPIO2_CONFIG_NA 0x00000000 | ||
291 | #define PORT_HW_CFG_GPIO2_CONFIG_LOW 0x00000010 | ||
292 | #define PORT_HW_CFG_GPIO2_CONFIG_HIGH 0x00000020 | ||
293 | #define PORT_HW_CFG_GPIO2_CONFIG_INPUT 0x00000030 | ||
294 | |||
295 | #define PORT_HW_CFG_GPIO3_CONFIG_MASK 0x000000C0 | ||
296 | #define PORT_HW_CFG_GPIO3_CONFIG_SHIFT 6 | ||
297 | #define PORT_HW_CFG_GPIO3_CONFIG_NA 0x00000000 | ||
298 | #define PORT_HW_CFG_GPIO3_CONFIG_LOW 0x00000040 | ||
299 | #define PORT_HW_CFG_GPIO3_CONFIG_HIGH 0x00000080 | ||
300 | #define PORT_HW_CFG_GPIO3_CONFIG_INPUT 0x000000c0 | ||
301 | |||
302 | /* | ||
303 | * When KR link is required to be set to force which is not | ||
304 | * KR-compliant, this parameter determine what is the trigger for it. | ||
305 | * When GPIO is selected, low input will force the speed. Currently | ||
306 | * default speed is 1G. In the future, it may be widen to select the | ||
307 | * forced speed in with another parameter. Note when force-1G is | ||
308 | * enabled, it override option 56: Link Speed option. | ||
309 | */ | ||
310 | #define PORT_HW_CFG_FORCE_KR_ENABLER_MASK 0x00000F00 | ||
311 | #define PORT_HW_CFG_FORCE_KR_ENABLER_SHIFT 8 | ||
312 | #define PORT_HW_CFG_FORCE_KR_ENABLER_NOT_FORCED 0x00000000 | ||
313 | #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO0_P0 0x00000100 | ||
314 | #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO1_P0 0x00000200 | ||
315 | #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO2_P0 0x00000300 | ||
316 | #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO3_P0 0x00000400 | ||
317 | #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO0_P1 0x00000500 | ||
318 | #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO1_P1 0x00000600 | ||
319 | #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO2_P1 0x00000700 | ||
320 | #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO3_P1 0x00000800 | ||
321 | #define PORT_HW_CFG_FORCE_KR_ENABLER_FORCED 0x00000900 | ||
322 | /* Enable to determine with which GPIO to reset the external phy */ | ||
323 | #define PORT_HW_CFG_EXT_PHY_GPIO_RST_MASK 0x000F0000 | ||
324 | #define PORT_HW_CFG_EXT_PHY_GPIO_RST_SHIFT 16 | ||
325 | #define PORT_HW_CFG_EXT_PHY_GPIO_RST_PHY_TYPE 0x00000000 | ||
326 | #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO0_P0 0x00010000 | ||
327 | #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO1_P0 0x00020000 | ||
328 | #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO2_P0 0x00030000 | ||
329 | #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO3_P0 0x00040000 | ||
330 | #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO0_P1 0x00050000 | ||
331 | #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO1_P1 0x00060000 | ||
332 | #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO2_P1 0x00070000 | ||
333 | #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO3_P1 0x00080000 | ||
334 | /* Enable BAM on KR */ | ||
335 | #define PORT_HW_CFG_ENABLE_BAM_ON_KR_MASK 0x00100000 | ||
336 | #define PORT_HW_CFG_ENABLE_BAM_ON_KR_SHIFT 20 | ||
337 | #define PORT_HW_CFG_ENABLE_BAM_ON_KR_DISABLED 0x00000000 | ||
338 | #define PORT_HW_CFG_ENABLE_BAM_ON_KR_ENABLED 0x00100000 | ||
339 | |||
340 | /* Enable Common Mode Sense */ | ||
341 | #define PORT_HW_CFG_ENABLE_CMS_MASK 0x00200000 | ||
342 | #define PORT_HW_CFG_ENABLE_CMS_SHIFT 21 | ||
343 | #define PORT_HW_CFG_ENABLE_CMS_DISABLED 0x00000000 | ||
344 | #define PORT_HW_CFG_ENABLE_CMS_ENABLED 0x00200000 | ||
345 | |||
346 | u32 speed_capability_mask2; /* 0x28C */ | ||
347 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_MASK 0x0000FFFF | ||
348 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_SHIFT 0 | ||
349 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_10M_FULL 0x00000001 | ||
350 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3__ 0x00000002 | ||
351 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3___ 0x00000004 | ||
352 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_100M_FULL 0x00000008 | ||
353 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_1G 0x00000010 | ||
354 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_2_DOT_5G 0x00000020 | ||
355 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_10G 0x00000040 | ||
356 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_12G 0x00000080 | ||
357 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_12_DOT_5G 0x00000100 | ||
358 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_13G 0x00000200 | ||
359 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_15G 0x00000400 | ||
360 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_16G 0x00000800 | ||
361 | |||
362 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_MASK 0xFFFF0000 | ||
363 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_SHIFT 16 | ||
364 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_10M_FULL 0x00010000 | ||
365 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D0__ 0x00020000 | ||
366 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D0___ 0x00040000 | ||
367 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_100M_FULL 0x00080000 | ||
368 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_1G 0x00100000 | ||
369 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_2_DOT_5G 0x00200000 | ||
370 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_10G 0x00400000 | ||
371 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_12G 0x00800000 | ||
372 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_12_DOT_5G 0x01000000 | ||
373 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_13G 0x02000000 | ||
374 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_15G 0x04000000 | ||
375 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_16G 0x08000000 | ||
376 | |||
377 | /* In the case where two media types (e.g. copper and fiber) are | ||
378 | present and electrically active at the same time, PHY Selection | ||
379 | will determine which of the two PHYs will be designated as the | ||
380 | Active PHY and used for a connection to the network. */ | ||
381 | u32 multi_phy_config; /* 0x290 */ | ||
382 | #define PORT_HW_CFG_PHY_SELECTION_MASK 0x00000007 | ||
383 | #define PORT_HW_CFG_PHY_SELECTION_SHIFT 0 | ||
384 | #define PORT_HW_CFG_PHY_SELECTION_HARDWARE_DEFAULT 0x00000000 | ||
385 | #define PORT_HW_CFG_PHY_SELECTION_FIRST_PHY 0x00000001 | ||
386 | #define PORT_HW_CFG_PHY_SELECTION_SECOND_PHY 0x00000002 | ||
387 | #define PORT_HW_CFG_PHY_SELECTION_FIRST_PHY_PRIORITY 0x00000003 | ||
388 | #define PORT_HW_CFG_PHY_SELECTION_SECOND_PHY_PRIORITY 0x00000004 | ||
389 | |||
390 | /* When enabled, all second phy nvram parameters will be swapped | ||
391 | with the first phy parameters */ | ||
392 | #define PORT_HW_CFG_PHY_SWAPPED_MASK 0x00000008 | ||
393 | #define PORT_HW_CFG_PHY_SWAPPED_SHIFT 3 | ||
394 | #define PORT_HW_CFG_PHY_SWAPPED_DISABLED 0x00000000 | ||
395 | #define PORT_HW_CFG_PHY_SWAPPED_ENABLED 0x00000008 | ||
396 | |||
397 | |||
398 | /* Address of the second external phy */ | ||
399 | u32 external_phy_config2; /* 0x294 */ | ||
400 | #define PORT_HW_CFG_XGXS_EXT_PHY2_ADDR_MASK 0x000000FF | ||
401 | #define PORT_HW_CFG_XGXS_EXT_PHY2_ADDR_SHIFT 0 | ||
402 | |||
403 | /* The second XGXS external PHY type */ | ||
404 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_MASK 0x0000FF00 | ||
405 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_SHIFT 8 | ||
406 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_DIRECT 0x00000000 | ||
407 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8071 0x00000100 | ||
408 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8072 0x00000200 | ||
409 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8073 0x00000300 | ||
410 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8705 0x00000400 | ||
411 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8706 0x00000500 | ||
412 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8726 0x00000600 | ||
413 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8481 0x00000700 | ||
414 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_SFX7101 0x00000800 | ||
415 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8727 0x00000900 | ||
416 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8727_NOC 0x00000a00 | ||
417 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM84823 0x00000b00 | ||
418 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM54640 0x00000c00 | ||
419 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM84833 0x00000d00 | ||
420 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_FAILURE 0x0000fd00 | ||
421 | #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_NOT_CONN 0x0000ff00 | ||
422 | |||
423 | /* 4 times 16 bits for all 4 lanes. For some external PHYs (such as | ||
424 | 8706, 8726 and 8727) not all 4 values are needed. */ | ||
425 | u16 xgxs_config2_rx[4]; /* 0x296 */ | ||
426 | u16 xgxs_config2_tx[4]; /* 0x2A0 */ | ||
225 | 427 | ||
226 | u32 lane_config; | 428 | u32 lane_config; |
227 | #define PORT_HW_CFG_LANE_SWAP_CFG_MASK 0x0000ffff | 429 | #define PORT_HW_CFG_LANE_SWAP_CFG_MASK 0x0000ffff |
228 | #define PORT_HW_CFG_LANE_SWAP_CFG_SHIFT 0 | 430 | #define PORT_HW_CFG_LANE_SWAP_CFG_SHIFT 0 |
431 | |||
229 | #define PORT_HW_CFG_LANE_SWAP_CFG_TX_MASK 0x000000ff | 432 | #define PORT_HW_CFG_LANE_SWAP_CFG_TX_MASK 0x000000ff |
230 | #define PORT_HW_CFG_LANE_SWAP_CFG_TX_SHIFT 0 | 433 | #define PORT_HW_CFG_LANE_SWAP_CFG_TX_SHIFT 0 |
231 | #define PORT_HW_CFG_LANE_SWAP_CFG_RX_MASK 0x0000ff00 | 434 | #define PORT_HW_CFG_LANE_SWAP_CFG_RX_MASK 0x0000ff00 |
@@ -240,6 +443,10 @@ struct port_hw_cfg { /* port 0: 0x12c port 1: 0x2bc */ | |||
240 | #define PORT_HW_CFG_LANE_SWAP_CFG_31203120 0x0000d8d8 | 443 | #define PORT_HW_CFG_LANE_SWAP_CFG_31203120 0x0000d8d8 |
241 | /* forced only */ | 444 | /* forced only */ |
242 | #define PORT_HW_CFG_LANE_SWAP_CFG_32103210 0x0000e4e4 | 445 | #define PORT_HW_CFG_LANE_SWAP_CFG_32103210 0x0000e4e4 |
446 | /* Indicate whether to swap the external phy polarity */ | ||
447 | #define PORT_HW_CFG_SWAP_PHY_POLARITY_MASK 0x00010000 | ||
448 | #define PORT_HW_CFG_SWAP_PHY_POLARITY_DISABLED 0x00000000 | ||
449 | #define PORT_HW_CFG_SWAP_PHY_POLARITY_ENABLED 0x00010000 | ||
243 | 450 | ||
244 | u32 external_phy_config; | 451 | u32 external_phy_config; |
245 | #define PORT_HW_CFG_SERDES_EXT_PHY_TYPE_MASK 0xff000000 | 452 | #define PORT_HW_CFG_SERDES_EXT_PHY_TYPE_MASK 0xff000000 |
@@ -265,6 +472,7 @@ struct port_hw_cfg { /* port 0: 0x12c port 1: 0x2bc */ | |||
265 | #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727 0x00000900 | 472 | #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727 0x00000900 |
266 | #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727_NOC 0x00000a00 | 473 | #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727_NOC 0x00000a00 |
267 | #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823 0x00000b00 | 474 | #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823 0x00000b00 |
475 | #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833 0x00000d00 | ||
268 | #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_FAILURE 0x0000fd00 | 476 | #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_FAILURE 0x0000fd00 |
269 | #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_NOT_CONN 0x0000ff00 | 477 | #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_NOT_CONN 0x0000ff00 |
270 | 478 | ||
@@ -322,7 +530,12 @@ struct shared_feat_cfg { /* NVRAM Offset */ | |||
322 | #define SHARED_FEAT_CFG_OVERRIDE_PREEMPHASIS_CFG_DISABLED 0x00000000 | 530 | #define SHARED_FEAT_CFG_OVERRIDE_PREEMPHASIS_CFG_DISABLED 0x00000000 |
323 | #define SHARED_FEAT_CFG_OVERRIDE_PREEMPHASIS_CFG_ENABLED 0x00000002 | 531 | #define SHARED_FEAT_CFG_OVERRIDE_PREEMPHASIS_CFG_ENABLED 0x00000002 |
324 | 532 | ||
325 | #define SHARED_FEATURE_MF_MODE_DISABLED 0x00000100 | 533 | #define SHARED_FEAT_CFG_FORCE_SF_MODE_MASK 0x00000700 |
534 | #define SHARED_FEAT_CFG_FORCE_SF_MODE_SHIFT 8 | ||
535 | #define SHARED_FEAT_CFG_FORCE_SF_MODE_MF_ALLOWED 0x00000000 | ||
536 | #define SHARED_FEAT_CFG_FORCE_SF_MODE_FORCED_SF 0x00000100 | ||
537 | #define SHARED_FEAT_CFG_FORCE_SF_MODE_SPIO4 0x00000200 | ||
538 | #define SHARED_FEAT_CFG_FORCE_SF_MODE_SWITCH_INDEPT 0x00000300 | ||
326 | 539 | ||
327 | }; | 540 | }; |
328 | 541 | ||
@@ -515,10 +728,17 @@ struct port_feat_cfg { /* port 0: 0x454 port 1: 0x4c8 */ | |||
515 | #define PORT_FEATURE_FLOW_CONTROL_NONE 0x00000400 | 728 | #define PORT_FEATURE_FLOW_CONTROL_NONE 0x00000400 |
516 | 729 | ||
517 | /* The default for MCP link configuration, | 730 | /* The default for MCP link configuration, |
518 | uses the same defines as link_config */ | 731 | uses the same defines as link_config */ |
519 | u32 mfw_wol_link_cfg; | 732 | u32 mfw_wol_link_cfg; |
733 | /* The default for the driver of the second external phy, | ||
734 | uses the same defines as link_config */ | ||
735 | u32 link_config2; /* 0x47C */ | ||
520 | 736 | ||
521 | u32 reserved[19]; | 737 | /* The default for MCP of the second external phy, |
738 | uses the same defines as link_config */ | ||
739 | u32 mfw_wol_link_cfg2; /* 0x480 */ | ||
740 | |||
741 | u32 Reserved2[17]; /* 0x484 */ | ||
522 | 742 | ||
523 | }; | 743 | }; |
524 | 744 | ||
@@ -551,6 +771,7 @@ struct shm_dev_info { /* size */ | |||
551 | #define FUNC_7 7 | 771 | #define FUNC_7 7 |
552 | #define E1_FUNC_MAX 2 | 772 | #define E1_FUNC_MAX 2 |
553 | #define E1H_FUNC_MAX 8 | 773 | #define E1H_FUNC_MAX 8 |
774 | #define E2_FUNC_MAX 4 /* per path */ | ||
554 | 775 | ||
555 | #define VN_0 0 | 776 | #define VN_0 0 |
556 | #define VN_1 1 | 777 | #define VN_1 1 |
@@ -559,7 +780,7 @@ struct shm_dev_info { /* size */ | |||
559 | #define E1VN_MAX 1 | 780 | #define E1VN_MAX 1 |
560 | #define E1HVN_MAX 4 | 781 | #define E1HVN_MAX 4 |
561 | 782 | ||
562 | 783 | #define E2_VF_MAX 64 | |
563 | /* This value (in milliseconds) determines the frequency of the driver | 784 | /* This value (in milliseconds) determines the frequency of the driver |
564 | * issuing the PULSE message code. The firmware monitors this periodic | 785 | * issuing the PULSE message code. The firmware monitors this periodic |
565 | * pulse to determine when to switch to an OS-absent mode. */ | 786 | * pulse to determine when to switch to an OS-absent mode. */ |
@@ -686,9 +907,20 @@ struct drv_func_mb { | |||
686 | * The optic module verification commands require bootcode | 907 | * The optic module verification commands require bootcode |
687 | * v5.0.6 or later | 908 | * v5.0.6 or later |
688 | */ | 909 | */ |
689 | #define DRV_MSG_CODE_VRFY_OPT_MDL 0xa0000000 | 910 | #define DRV_MSG_CODE_VRFY_FIRST_PHY_OPT_MDL 0xa0000000 |
690 | #define REQ_BC_VER_4_VRFY_OPT_MDL 0x00050006 | 911 | #define REQ_BC_VER_4_VRFY_FIRST_PHY_OPT_MDL 0x00050006 |
691 | 912 | /* | |
913 | * The specific optic module verification command requires bootcode | ||
914 | * v5.2.12 or later | ||
915 | */ | ||
916 | #define DRV_MSG_CODE_VRFY_SPECIFIC_PHY_OPT_MDL 0xa1000000 | ||
917 | #define REQ_BC_VER_4_VRFY_SPECIFIC_PHY_OPT_MDL 0x00050234 | ||
918 | |||
919 | #define DRV_MSG_CODE_DCBX_ADMIN_PMF_MSG 0xb0000000 | ||
920 | #define DRV_MSG_CODE_DCBX_PMF_DRV_OK 0xb2000000 | ||
921 | #define DRV_MSG_CODE_SET_MF_BW 0xe0000000 | ||
922 | #define REQ_BC_VER_4_SET_MF_BW 0x00060202 | ||
923 | #define DRV_MSG_CODE_SET_MF_BW_ACK 0xe1000000 | ||
692 | #define BIOS_MSG_CODE_LIC_CHALLENGE 0xff010000 | 924 | #define BIOS_MSG_CODE_LIC_CHALLENGE 0xff010000 |
693 | #define BIOS_MSG_CODE_LIC_RESPONSE 0xff020000 | 925 | #define BIOS_MSG_CODE_LIC_RESPONSE 0xff020000 |
694 | #define BIOS_MSG_CODE_VIRT_MAC_PRIM 0xff030000 | 926 | #define BIOS_MSG_CODE_VIRT_MAC_PRIM 0xff030000 |
@@ -703,6 +935,9 @@ struct drv_func_mb { | |||
703 | #define FW_MSG_CODE_DRV_LOAD_COMMON 0x10100000 | 935 | #define FW_MSG_CODE_DRV_LOAD_COMMON 0x10100000 |
704 | #define FW_MSG_CODE_DRV_LOAD_PORT 0x10110000 | 936 | #define FW_MSG_CODE_DRV_LOAD_PORT 0x10110000 |
705 | #define FW_MSG_CODE_DRV_LOAD_FUNCTION 0x10120000 | 937 | #define FW_MSG_CODE_DRV_LOAD_FUNCTION 0x10120000 |
938 | /* Load common chip is supported from bc 6.0.0 */ | ||
939 | #define REQ_BC_VER_4_DRV_LOAD_COMMON_CHIP 0x00060000 | ||
940 | #define FW_MSG_CODE_DRV_LOAD_COMMON_CHIP 0x10130000 | ||
706 | #define FW_MSG_CODE_DRV_LOAD_REFUSED 0x10200000 | 941 | #define FW_MSG_CODE_DRV_LOAD_REFUSED 0x10200000 |
707 | #define FW_MSG_CODE_DRV_LOAD_DONE 0x11100000 | 942 | #define FW_MSG_CODE_DRV_LOAD_DONE 0x11100000 |
708 | #define FW_MSG_CODE_DRV_UNLOAD_COMMON 0x20100000 | 943 | #define FW_MSG_CODE_DRV_UNLOAD_COMMON 0x20100000 |
@@ -759,6 +994,7 @@ struct drv_func_mb { | |||
759 | 994 | ||
760 | u32 drv_status; | 995 | u32 drv_status; |
761 | #define DRV_STATUS_PMF 0x00000001 | 996 | #define DRV_STATUS_PMF 0x00000001 |
997 | #define DRV_STATUS_SET_MF_BW 0x00000004 | ||
762 | 998 | ||
763 | #define DRV_STATUS_DCC_EVENT_MASK 0x0000ff00 | 999 | #define DRV_STATUS_DCC_EVENT_MASK 0x0000ff00 |
764 | #define DRV_STATUS_DCC_DISABLE_ENABLE_PF 0x00000100 | 1000 | #define DRV_STATUS_DCC_DISABLE_ENABLE_PF 0x00000100 |
@@ -767,6 +1003,8 @@ struct drv_func_mb { | |||
767 | #define DRV_STATUS_DCC_RESERVED1 0x00000800 | 1003 | #define DRV_STATUS_DCC_RESERVED1 0x00000800 |
768 | #define DRV_STATUS_DCC_SET_PROTOCOL 0x00001000 | 1004 | #define DRV_STATUS_DCC_SET_PROTOCOL 0x00001000 |
769 | #define DRV_STATUS_DCC_SET_PRIORITY 0x00002000 | 1005 | #define DRV_STATUS_DCC_SET_PRIORITY 0x00002000 |
1006 | #define DRV_STATUS_DCBX_EVENT_MASK 0x000f0000 | ||
1007 | #define DRV_STATUS_DCBX_NEGOTIATION_RESULTS 0x00010000 | ||
770 | 1008 | ||
771 | u32 virt_mac_upper; | 1009 | u32 virt_mac_upper; |
772 | #define VIRT_MAC_SIGN_MASK 0xffff0000 | 1010 | #define VIRT_MAC_SIGN_MASK 0xffff0000 |
@@ -859,12 +1097,43 @@ struct func_mf_cfg { | |||
859 | 1097 | ||
860 | }; | 1098 | }; |
861 | 1099 | ||
1100 | /* This structure is not applicable and should not be accessed on 57711 */ | ||
1101 | struct func_ext_cfg { | ||
1102 | u32 func_cfg; | ||
1103 | #define MACP_FUNC_CFG_FLAGS_MASK 0x000000FF | ||
1104 | #define MACP_FUNC_CFG_FLAGS_SHIFT 0 | ||
1105 | #define MACP_FUNC_CFG_FLAGS_ENABLED 0x00000001 | ||
1106 | #define MACP_FUNC_CFG_FLAGS_ETHERNET 0x00000002 | ||
1107 | #define MACP_FUNC_CFG_FLAGS_ISCSI_OFFLOAD 0x00000004 | ||
1108 | #define MACP_FUNC_CFG_FLAGS_FCOE_OFFLOAD 0x00000008 | ||
1109 | |||
1110 | u32 iscsi_mac_addr_upper; | ||
1111 | u32 iscsi_mac_addr_lower; | ||
1112 | |||
1113 | u32 fcoe_mac_addr_upper; | ||
1114 | u32 fcoe_mac_addr_lower; | ||
1115 | |||
1116 | u32 fcoe_wwn_port_name_upper; | ||
1117 | u32 fcoe_wwn_port_name_lower; | ||
1118 | |||
1119 | u32 fcoe_wwn_node_name_upper; | ||
1120 | u32 fcoe_wwn_node_name_lower; | ||
1121 | |||
1122 | u32 preserve_data; | ||
1123 | #define MF_FUNC_CFG_PRESERVE_L2_MAC (1<<0) | ||
1124 | #define MF_FUNC_CFG_PRESERVE_ISCSI_MAC (1<<1) | ||
1125 | #define MF_FUNC_CFG_PRESERVE_FCOE_MAC (1<<2) | ||
1126 | #define MF_FUNC_CFG_PRESERVE_FCOE_WWN_P (1<<3) | ||
1127 | #define MF_FUNC_CFG_PRESERVE_FCOE_WWN_N (1<<4) | ||
1128 | }; | ||
1129 | |||
862 | struct mf_cfg { | 1130 | struct mf_cfg { |
863 | 1131 | ||
864 | struct shared_mf_cfg shared_mf_config; | 1132 | struct shared_mf_cfg shared_mf_config; |
865 | struct port_mf_cfg port_mf_config[PORT_MAX]; | 1133 | struct port_mf_cfg port_mf_config[PORT_MAX]; |
866 | struct func_mf_cfg func_mf_config[E1H_FUNC_MAX]; | 1134 | struct func_mf_cfg func_mf_config[E1H_FUNC_MAX]; |
867 | 1135 | ||
1136 | struct func_ext_cfg func_ext_config[E1H_FUNC_MAX]; | ||
868 | }; | 1137 | }; |
869 | 1138 | ||
870 | 1139 | ||
@@ -903,12 +1172,268 @@ struct shmem_region { /* SharedMem Offset (size) */ | |||
903 | struct mgmtfw_state mgmtfw_state; /* 0x4ac (0x1b8) */ | 1172 | struct mgmtfw_state mgmtfw_state; /* 0x4ac (0x1b8) */ |
904 | 1173 | ||
905 | struct drv_port_mb port_mb[PORT_MAX]; /* 0x664 (16*2=0x20) */ | 1174 | struct drv_port_mb port_mb[PORT_MAX]; /* 0x664 (16*2=0x20) */ |
906 | struct drv_func_mb func_mb[E1H_FUNC_MAX]; | 1175 | struct drv_func_mb func_mb[]; /* 0x684 |
1176 | (44*2/4/8=0x58/0xb0/0x160) */ | ||
1177 | |||
1178 | }; /* 57710 = 0x6dc | 57711 = 0x7E4 | 57712 = 0x734 */ | ||
907 | 1179 | ||
908 | struct mf_cfg mf_cfg; | 1180 | struct fw_flr_ack { |
1181 | u32 pf_ack; | ||
1182 | u32 vf_ack[1]; | ||
1183 | u32 iov_dis_ack; | ||
1184 | }; | ||
1185 | |||
1186 | struct fw_flr_mb { | ||
1187 | u32 aggint; | ||
1188 | u32 opgen_addr; | ||
1189 | struct fw_flr_ack ack; | ||
1190 | }; | ||
909 | 1191 | ||
910 | }; /* 0x6dc */ | 1192 | /**** SUPPORT FOR SHMEM ARRRAYS *** |
1193 | * The SHMEM HSI is aligned on 32 bit boundaries which makes it difficult to | ||
1194 | * define arrays with storage types smaller then unsigned dwords. | ||
1195 | * The macros below add generic support for SHMEM arrays with numeric elements | ||
1196 | * that can span 2,4,8 or 16 bits. The array underlying type is a 32 bit dword | ||
1197 | * array with individual bit-filed elements accessed using shifts and masks. | ||
1198 | * | ||
1199 | */ | ||
911 | 1200 | ||
1201 | /* eb is the bitwidth of a single element */ | ||
1202 | #define SHMEM_ARRAY_MASK(eb) ((1<<(eb))-1) | ||
1203 | #define SHMEM_ARRAY_ENTRY(i, eb) ((i)/(32/(eb))) | ||
1204 | |||
1205 | /* the bit-position macro allows the used to flip the order of the arrays | ||
1206 | * elements on a per byte or word boundary. | ||
1207 | * | ||
1208 | * example: an array with 8 entries each 4 bit wide. This array will fit into | ||
1209 | * a single dword. The diagrmas below show the array order of the nibbles. | ||
1210 | * | ||
1211 | * SHMEM_ARRAY_BITPOS(i, 4, 4) defines the stadard ordering: | ||
1212 | * | ||
1213 | * | | | | | ||
1214 | * 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | | ||
1215 | * | | | | | ||
1216 | * | ||
1217 | * SHMEM_ARRAY_BITPOS(i, 4, 8) defines a flip ordering per byte: | ||
1218 | * | ||
1219 | * | | | | | ||
1220 | * 1 | 0 | 3 | 2 | 5 | 4 | 7 | 6 | | ||
1221 | * | | | | | ||
1222 | * | ||
1223 | * SHMEM_ARRAY_BITPOS(i, 4, 16) defines a flip ordering per word: | ||
1224 | * | ||
1225 | * | | | | | ||
1226 | * 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | | ||
1227 | * | | | | | ||
1228 | */ | ||
1229 | #define SHMEM_ARRAY_BITPOS(i, eb, fb) \ | ||
1230 | ((((32/(fb)) - 1 - ((i)/((fb)/(eb))) % (32/(fb))) * (fb)) + \ | ||
1231 | (((i)%((fb)/(eb))) * (eb))) | ||
1232 | |||
1233 | #define SHMEM_ARRAY_GET(a, i, eb, fb) \ | ||
1234 | ((a[SHMEM_ARRAY_ENTRY(i, eb)] >> SHMEM_ARRAY_BITPOS(i, eb, fb)) & \ | ||
1235 | SHMEM_ARRAY_MASK(eb)) | ||
1236 | |||
1237 | #define SHMEM_ARRAY_SET(a, i, eb, fb, val) \ | ||
1238 | do { \ | ||
1239 | a[SHMEM_ARRAY_ENTRY(i, eb)] &= ~(SHMEM_ARRAY_MASK(eb) << \ | ||
1240 | SHMEM_ARRAY_BITPOS(i, eb, fb)); \ | ||
1241 | a[SHMEM_ARRAY_ENTRY(i, eb)] |= (((val) & SHMEM_ARRAY_MASK(eb)) << \ | ||
1242 | SHMEM_ARRAY_BITPOS(i, eb, fb)); \ | ||
1243 | } while (0) | ||
1244 | |||
1245 | |||
1246 | /****START OF DCBX STRUCTURES DECLARATIONS****/ | ||
1247 | #define DCBX_MAX_NUM_PRI_PG_ENTRIES 8 | ||
1248 | #define DCBX_PRI_PG_BITWIDTH 4 | ||
1249 | #define DCBX_PRI_PG_FBITS 8 | ||
1250 | #define DCBX_PRI_PG_GET(a, i) \ | ||
1251 | SHMEM_ARRAY_GET(a, i, DCBX_PRI_PG_BITWIDTH, DCBX_PRI_PG_FBITS) | ||
1252 | #define DCBX_PRI_PG_SET(a, i, val) \ | ||
1253 | SHMEM_ARRAY_SET(a, i, DCBX_PRI_PG_BITWIDTH, DCBX_PRI_PG_FBITS, val) | ||
1254 | #define DCBX_MAX_NUM_PG_BW_ENTRIES 8 | ||
1255 | #define DCBX_BW_PG_BITWIDTH 8 | ||
1256 | #define DCBX_PG_BW_GET(a, i) \ | ||
1257 | SHMEM_ARRAY_GET(a, i, DCBX_BW_PG_BITWIDTH, DCBX_BW_PG_BITWIDTH) | ||
1258 | #define DCBX_PG_BW_SET(a, i, val) \ | ||
1259 | SHMEM_ARRAY_SET(a, i, DCBX_BW_PG_BITWIDTH, DCBX_BW_PG_BITWIDTH, val) | ||
1260 | #define DCBX_STRICT_PRI_PG 15 | ||
1261 | #define DCBX_MAX_APP_PROTOCOL 16 | ||
1262 | #define FCOE_APP_IDX 0 | ||
1263 | #define ISCSI_APP_IDX 1 | ||
1264 | #define PREDEFINED_APP_IDX_MAX 2 | ||
1265 | |||
1266 | struct dcbx_ets_feature { | ||
1267 | u32 enabled; | ||
1268 | u32 pg_bw_tbl[2]; | ||
1269 | u32 pri_pg_tbl[1]; | ||
1270 | }; | ||
1271 | |||
1272 | struct dcbx_pfc_feature { | ||
1273 | #ifdef __BIG_ENDIAN | ||
1274 | u8 pri_en_bitmap; | ||
1275 | #define DCBX_PFC_PRI_0 0x01 | ||
1276 | #define DCBX_PFC_PRI_1 0x02 | ||
1277 | #define DCBX_PFC_PRI_2 0x04 | ||
1278 | #define DCBX_PFC_PRI_3 0x08 | ||
1279 | #define DCBX_PFC_PRI_4 0x10 | ||
1280 | #define DCBX_PFC_PRI_5 0x20 | ||
1281 | #define DCBX_PFC_PRI_6 0x40 | ||
1282 | #define DCBX_PFC_PRI_7 0x80 | ||
1283 | u8 pfc_caps; | ||
1284 | u8 reserved; | ||
1285 | u8 enabled; | ||
1286 | #elif defined(__LITTLE_ENDIAN) | ||
1287 | u8 enabled; | ||
1288 | u8 reserved; | ||
1289 | u8 pfc_caps; | ||
1290 | u8 pri_en_bitmap; | ||
1291 | #define DCBX_PFC_PRI_0 0x01 | ||
1292 | #define DCBX_PFC_PRI_1 0x02 | ||
1293 | #define DCBX_PFC_PRI_2 0x04 | ||
1294 | #define DCBX_PFC_PRI_3 0x08 | ||
1295 | #define DCBX_PFC_PRI_4 0x10 | ||
1296 | #define DCBX_PFC_PRI_5 0x20 | ||
1297 | #define DCBX_PFC_PRI_6 0x40 | ||
1298 | #define DCBX_PFC_PRI_7 0x80 | ||
1299 | #endif | ||
1300 | }; | ||
1301 | |||
1302 | struct dcbx_app_priority_entry { | ||
1303 | #ifdef __BIG_ENDIAN | ||
1304 | u16 app_id; | ||
1305 | u8 pri_bitmap; | ||
1306 | u8 appBitfield; | ||
1307 | #define DCBX_APP_ENTRY_VALID 0x01 | ||
1308 | #define DCBX_APP_ENTRY_SF_MASK 0x30 | ||
1309 | #define DCBX_APP_ENTRY_SF_SHIFT 4 | ||
1310 | #define DCBX_APP_SF_ETH_TYPE 0x10 | ||
1311 | #define DCBX_APP_SF_PORT 0x20 | ||
1312 | #elif defined(__LITTLE_ENDIAN) | ||
1313 | u8 appBitfield; | ||
1314 | #define DCBX_APP_ENTRY_VALID 0x01 | ||
1315 | #define DCBX_APP_ENTRY_SF_MASK 0x30 | ||
1316 | #define DCBX_APP_ENTRY_SF_SHIFT 4 | ||
1317 | #define DCBX_APP_SF_ETH_TYPE 0x10 | ||
1318 | #define DCBX_APP_SF_PORT 0x20 | ||
1319 | u8 pri_bitmap; | ||
1320 | u16 app_id; | ||
1321 | #endif | ||
1322 | }; | ||
1323 | |||
1324 | struct dcbx_app_priority_feature { | ||
1325 | #ifdef __BIG_ENDIAN | ||
1326 | u8 reserved; | ||
1327 | u8 default_pri; | ||
1328 | u8 tc_supported; | ||
1329 | u8 enabled; | ||
1330 | #elif defined(__LITTLE_ENDIAN) | ||
1331 | u8 enabled; | ||
1332 | u8 tc_supported; | ||
1333 | u8 default_pri; | ||
1334 | u8 reserved; | ||
1335 | #endif | ||
1336 | struct dcbx_app_priority_entry app_pri_tbl[DCBX_MAX_APP_PROTOCOL]; | ||
1337 | }; | ||
1338 | |||
1339 | struct dcbx_features { | ||
1340 | struct dcbx_ets_feature ets; | ||
1341 | struct dcbx_pfc_feature pfc; | ||
1342 | struct dcbx_app_priority_feature app; | ||
1343 | }; | ||
1344 | |||
1345 | struct lldp_params { | ||
1346 | #ifdef __BIG_ENDIAN | ||
1347 | u8 msg_fast_tx_interval; | ||
1348 | u8 msg_tx_hold; | ||
1349 | u8 msg_tx_interval; | ||
1350 | u8 admin_status; | ||
1351 | #define LLDP_TX_ONLY 0x01 | ||
1352 | #define LLDP_RX_ONLY 0x02 | ||
1353 | #define LLDP_TX_RX 0x03 | ||
1354 | #define LLDP_DISABLED 0x04 | ||
1355 | u8 reserved1; | ||
1356 | u8 tx_fast; | ||
1357 | u8 tx_crd_max; | ||
1358 | u8 tx_crd; | ||
1359 | #elif defined(__LITTLE_ENDIAN) | ||
1360 | u8 admin_status; | ||
1361 | #define LLDP_TX_ONLY 0x01 | ||
1362 | #define LLDP_RX_ONLY 0x02 | ||
1363 | #define LLDP_TX_RX 0x03 | ||
1364 | #define LLDP_DISABLED 0x04 | ||
1365 | u8 msg_tx_interval; | ||
1366 | u8 msg_tx_hold; | ||
1367 | u8 msg_fast_tx_interval; | ||
1368 | u8 tx_crd; | ||
1369 | u8 tx_crd_max; | ||
1370 | u8 tx_fast; | ||
1371 | u8 reserved1; | ||
1372 | #endif | ||
1373 | #define REM_CHASSIS_ID_STAT_LEN 4 | ||
1374 | #define REM_PORT_ID_STAT_LEN 4 | ||
1375 | u32 peer_chassis_id[REM_CHASSIS_ID_STAT_LEN]; | ||
1376 | u32 peer_port_id[REM_PORT_ID_STAT_LEN]; | ||
1377 | }; | ||
1378 | |||
1379 | struct lldp_dcbx_stat { | ||
1380 | #define LOCAL_CHASSIS_ID_STAT_LEN 2 | ||
1381 | #define LOCAL_PORT_ID_STAT_LEN 2 | ||
1382 | u32 local_chassis_id[LOCAL_CHASSIS_ID_STAT_LEN]; | ||
1383 | u32 local_port_id[LOCAL_PORT_ID_STAT_LEN]; | ||
1384 | u32 num_tx_dcbx_pkts; | ||
1385 | u32 num_rx_dcbx_pkts; | ||
1386 | }; | ||
1387 | |||
1388 | struct lldp_admin_mib { | ||
1389 | u32 ver_cfg_flags; | ||
1390 | #define DCBX_ETS_CONFIG_TX_ENABLED 0x00000001 | ||
1391 | #define DCBX_PFC_CONFIG_TX_ENABLED 0x00000002 | ||
1392 | #define DCBX_APP_CONFIG_TX_ENABLED 0x00000004 | ||
1393 | #define DCBX_ETS_RECO_TX_ENABLED 0x00000008 | ||
1394 | #define DCBX_ETS_RECO_VALID 0x00000010 | ||
1395 | #define DCBX_ETS_WILLING 0x00000020 | ||
1396 | #define DCBX_PFC_WILLING 0x00000040 | ||
1397 | #define DCBX_APP_WILLING 0x00000080 | ||
1398 | #define DCBX_VERSION_CEE 0x00000100 | ||
1399 | #define DCBX_VERSION_IEEE 0x00000200 | ||
1400 | #define DCBX_DCBX_ENABLED 0x00000400 | ||
1401 | #define DCBX_CEE_VERSION_MASK 0x0000f000 | ||
1402 | #define DCBX_CEE_VERSION_SHIFT 12 | ||
1403 | #define DCBX_CEE_MAX_VERSION_MASK 0x000f0000 | ||
1404 | #define DCBX_CEE_MAX_VERSION_SHIFT 16 | ||
1405 | struct dcbx_features features; | ||
1406 | }; | ||
1407 | |||
1408 | struct lldp_remote_mib { | ||
1409 | u32 prefix_seq_num; | ||
1410 | u32 flags; | ||
1411 | #define DCBX_ETS_TLV_RX 0x00000001 | ||
1412 | #define DCBX_PFC_TLV_RX 0x00000002 | ||
1413 | #define DCBX_APP_TLV_RX 0x00000004 | ||
1414 | #define DCBX_ETS_RX_ERROR 0x00000010 | ||
1415 | #define DCBX_PFC_RX_ERROR 0x00000020 | ||
1416 | #define DCBX_APP_RX_ERROR 0x00000040 | ||
1417 | #define DCBX_ETS_REM_WILLING 0x00000100 | ||
1418 | #define DCBX_PFC_REM_WILLING 0x00000200 | ||
1419 | #define DCBX_APP_REM_WILLING 0x00000400 | ||
1420 | #define DCBX_REMOTE_ETS_RECO_VALID 0x00001000 | ||
1421 | struct dcbx_features features; | ||
1422 | u32 suffix_seq_num; | ||
1423 | }; | ||
1424 | |||
1425 | struct lldp_local_mib { | ||
1426 | u32 prefix_seq_num; | ||
1427 | u32 error; | ||
1428 | #define DCBX_LOCAL_ETS_ERROR 0x00000001 | ||
1429 | #define DCBX_LOCAL_PFC_ERROR 0x00000002 | ||
1430 | #define DCBX_LOCAL_APP_ERROR 0x00000004 | ||
1431 | #define DCBX_LOCAL_PFC_MISMATCH 0x00000010 | ||
1432 | #define DCBX_LOCAL_APP_MISMATCH 0x00000020 | ||
1433 | struct dcbx_features features; | ||
1434 | u32 suffix_seq_num; | ||
1435 | }; | ||
1436 | /***END OF DCBX STRUCTURES DECLARATIONS***/ | ||
912 | 1437 | ||
913 | struct shmem2_region { | 1438 | struct shmem2_region { |
914 | 1439 | ||
@@ -922,7 +1447,34 @@ struct shmem2_region { | |||
922 | #define SHMEM_DCC_SUPPORT_SET_PROTOCOL_TLV 0x00000040 | 1447 | #define SHMEM_DCC_SUPPORT_SET_PROTOCOL_TLV 0x00000040 |
923 | #define SHMEM_DCC_SUPPORT_SET_PRIORITY_TLV 0x00000080 | 1448 | #define SHMEM_DCC_SUPPORT_SET_PRIORITY_TLV 0x00000080 |
924 | #define SHMEM_DCC_SUPPORT_DEFAULT SHMEM_DCC_SUPPORT_NONE | 1449 | #define SHMEM_DCC_SUPPORT_DEFAULT SHMEM_DCC_SUPPORT_NONE |
925 | 1450 | u32 ext_phy_fw_version2[PORT_MAX]; | |
1451 | /* | ||
1452 | * For backwards compatibility, if the mf_cfg_addr does not exist | ||
1453 | * (the size filed is smaller than 0xc) the mf_cfg resides at the | ||
1454 | * end of struct shmem_region | ||
1455 | */ | ||
1456 | u32 mf_cfg_addr; | ||
1457 | #define SHMEM_MF_CFG_ADDR_NONE 0x00000000 | ||
1458 | |||
1459 | struct fw_flr_mb flr_mb; | ||
1460 | u32 dcbx_lldp_params_offset; | ||
1461 | #define SHMEM_LLDP_DCBX_PARAMS_NONE 0x00000000 | ||
1462 | u32 dcbx_neg_res_offset; | ||
1463 | #define SHMEM_DCBX_NEG_RES_NONE 0x00000000 | ||
1464 | u32 dcbx_remote_mib_offset; | ||
1465 | #define SHMEM_DCBX_REMOTE_MIB_NONE 0x00000000 | ||
1466 | /* | ||
1467 | * The other shmemX_base_addr holds the other path's shmem address | ||
1468 | * required for example in case of common phy init, or for path1 to know | ||
1469 | * the address of mcp debug trace which is located in offset from shmem | ||
1470 | * of path0 | ||
1471 | */ | ||
1472 | u32 other_shmem_base_addr; | ||
1473 | u32 other_shmem2_base_addr; | ||
1474 | u32 reserved1[E2_VF_MAX / 32]; | ||
1475 | u32 reserved2[E2_FUNC_MAX][E2_VF_MAX / 32]; | ||
1476 | u32 dcbx_lldp_dcbx_stat_offset; | ||
1477 | #define SHMEM_LLDP_DCBX_STAT_NONE 0x00000000 | ||
926 | }; | 1478 | }; |
927 | 1479 | ||
928 | 1480 | ||
@@ -978,7 +1530,7 @@ struct emac_stats { | |||
978 | }; | 1530 | }; |
979 | 1531 | ||
980 | 1532 | ||
981 | struct bmac_stats { | 1533 | struct bmac1_stats { |
982 | u32 tx_stat_gtpkt_lo; | 1534 | u32 tx_stat_gtpkt_lo; |
983 | u32 tx_stat_gtpkt_hi; | 1535 | u32 tx_stat_gtpkt_hi; |
984 | u32 tx_stat_gtxpf_lo; | 1536 | u32 tx_stat_gtxpf_lo; |
@@ -1082,10 +1634,126 @@ struct bmac_stats { | |||
1082 | u32 rx_stat_gripj_hi; | 1634 | u32 rx_stat_gripj_hi; |
1083 | }; | 1635 | }; |
1084 | 1636 | ||
1637 | struct bmac2_stats { | ||
1638 | u32 tx_stat_gtpk_lo; /* gtpok */ | ||
1639 | u32 tx_stat_gtpk_hi; /* gtpok */ | ||
1640 | u32 tx_stat_gtxpf_lo; /* gtpf */ | ||
1641 | u32 tx_stat_gtxpf_hi; /* gtpf */ | ||
1642 | u32 tx_stat_gtpp_lo; /* NEW BMAC2 */ | ||
1643 | u32 tx_stat_gtpp_hi; /* NEW BMAC2 */ | ||
1644 | u32 tx_stat_gtfcs_lo; | ||
1645 | u32 tx_stat_gtfcs_hi; | ||
1646 | u32 tx_stat_gtuca_lo; /* NEW BMAC2 */ | ||
1647 | u32 tx_stat_gtuca_hi; /* NEW BMAC2 */ | ||
1648 | u32 tx_stat_gtmca_lo; | ||
1649 | u32 tx_stat_gtmca_hi; | ||
1650 | u32 tx_stat_gtbca_lo; | ||
1651 | u32 tx_stat_gtbca_hi; | ||
1652 | u32 tx_stat_gtovr_lo; | ||
1653 | u32 tx_stat_gtovr_hi; | ||
1654 | u32 tx_stat_gtfrg_lo; | ||
1655 | u32 tx_stat_gtfrg_hi; | ||
1656 | u32 tx_stat_gtpkt1_lo; /* gtpkt */ | ||
1657 | u32 tx_stat_gtpkt1_hi; /* gtpkt */ | ||
1658 | u32 tx_stat_gt64_lo; | ||
1659 | u32 tx_stat_gt64_hi; | ||
1660 | u32 tx_stat_gt127_lo; | ||
1661 | u32 tx_stat_gt127_hi; | ||
1662 | u32 tx_stat_gt255_lo; | ||
1663 | u32 tx_stat_gt255_hi; | ||
1664 | u32 tx_stat_gt511_lo; | ||
1665 | u32 tx_stat_gt511_hi; | ||
1666 | u32 tx_stat_gt1023_lo; | ||
1667 | u32 tx_stat_gt1023_hi; | ||
1668 | u32 tx_stat_gt1518_lo; | ||
1669 | u32 tx_stat_gt1518_hi; | ||
1670 | u32 tx_stat_gt2047_lo; | ||
1671 | u32 tx_stat_gt2047_hi; | ||
1672 | u32 tx_stat_gt4095_lo; | ||
1673 | u32 tx_stat_gt4095_hi; | ||
1674 | u32 tx_stat_gt9216_lo; | ||
1675 | u32 tx_stat_gt9216_hi; | ||
1676 | u32 tx_stat_gt16383_lo; | ||
1677 | u32 tx_stat_gt16383_hi; | ||
1678 | u32 tx_stat_gtmax_lo; | ||
1679 | u32 tx_stat_gtmax_hi; | ||
1680 | u32 tx_stat_gtufl_lo; | ||
1681 | u32 tx_stat_gtufl_hi; | ||
1682 | u32 tx_stat_gterr_lo; | ||
1683 | u32 tx_stat_gterr_hi; | ||
1684 | u32 tx_stat_gtbyt_lo; | ||
1685 | u32 tx_stat_gtbyt_hi; | ||
1686 | |||
1687 | u32 rx_stat_gr64_lo; | ||
1688 | u32 rx_stat_gr64_hi; | ||
1689 | u32 rx_stat_gr127_lo; | ||
1690 | u32 rx_stat_gr127_hi; | ||
1691 | u32 rx_stat_gr255_lo; | ||
1692 | u32 rx_stat_gr255_hi; | ||
1693 | u32 rx_stat_gr511_lo; | ||
1694 | u32 rx_stat_gr511_hi; | ||
1695 | u32 rx_stat_gr1023_lo; | ||
1696 | u32 rx_stat_gr1023_hi; | ||
1697 | u32 rx_stat_gr1518_lo; | ||
1698 | u32 rx_stat_gr1518_hi; | ||
1699 | u32 rx_stat_gr2047_lo; | ||
1700 | u32 rx_stat_gr2047_hi; | ||
1701 | u32 rx_stat_gr4095_lo; | ||
1702 | u32 rx_stat_gr4095_hi; | ||
1703 | u32 rx_stat_gr9216_lo; | ||
1704 | u32 rx_stat_gr9216_hi; | ||
1705 | u32 rx_stat_gr16383_lo; | ||
1706 | u32 rx_stat_gr16383_hi; | ||
1707 | u32 rx_stat_grmax_lo; | ||
1708 | u32 rx_stat_grmax_hi; | ||
1709 | u32 rx_stat_grpkt_lo; | ||
1710 | u32 rx_stat_grpkt_hi; | ||
1711 | u32 rx_stat_grfcs_lo; | ||
1712 | u32 rx_stat_grfcs_hi; | ||
1713 | u32 rx_stat_gruca_lo; | ||
1714 | u32 rx_stat_gruca_hi; | ||
1715 | u32 rx_stat_grmca_lo; | ||
1716 | u32 rx_stat_grmca_hi; | ||
1717 | u32 rx_stat_grbca_lo; | ||
1718 | u32 rx_stat_grbca_hi; | ||
1719 | u32 rx_stat_grxpf_lo; /* grpf */ | ||
1720 | u32 rx_stat_grxpf_hi; /* grpf */ | ||
1721 | u32 rx_stat_grpp_lo; | ||
1722 | u32 rx_stat_grpp_hi; | ||
1723 | u32 rx_stat_grxuo_lo; /* gruo */ | ||
1724 | u32 rx_stat_grxuo_hi; /* gruo */ | ||
1725 | u32 rx_stat_grjbr_lo; | ||
1726 | u32 rx_stat_grjbr_hi; | ||
1727 | u32 rx_stat_grovr_lo; | ||
1728 | u32 rx_stat_grovr_hi; | ||
1729 | u32 rx_stat_grxcf_lo; /* grcf */ | ||
1730 | u32 rx_stat_grxcf_hi; /* grcf */ | ||
1731 | u32 rx_stat_grflr_lo; | ||
1732 | u32 rx_stat_grflr_hi; | ||
1733 | u32 rx_stat_grpok_lo; | ||
1734 | u32 rx_stat_grpok_hi; | ||
1735 | u32 rx_stat_grmeg_lo; | ||
1736 | u32 rx_stat_grmeg_hi; | ||
1737 | u32 rx_stat_grmeb_lo; | ||
1738 | u32 rx_stat_grmeb_hi; | ||
1739 | u32 rx_stat_grbyt_lo; | ||
1740 | u32 rx_stat_grbyt_hi; | ||
1741 | u32 rx_stat_grund_lo; | ||
1742 | u32 rx_stat_grund_hi; | ||
1743 | u32 rx_stat_grfrg_lo; | ||
1744 | u32 rx_stat_grfrg_hi; | ||
1745 | u32 rx_stat_grerb_lo; /* grerrbyt */ | ||
1746 | u32 rx_stat_grerb_hi; /* grerrbyt */ | ||
1747 | u32 rx_stat_grfre_lo; /* grfrerr */ | ||
1748 | u32 rx_stat_grfre_hi; /* grfrerr */ | ||
1749 | u32 rx_stat_gripj_lo; | ||
1750 | u32 rx_stat_gripj_hi; | ||
1751 | }; | ||
1085 | 1752 | ||
1086 | union mac_stats { | 1753 | union mac_stats { |
1087 | struct emac_stats emac_stats; | 1754 | struct emac_stats emac_stats; |
1088 | struct bmac_stats bmac_stats; | 1755 | struct bmac1_stats bmac1_stats; |
1756 | struct bmac2_stats bmac2_stats; | ||
1089 | }; | 1757 | }; |
1090 | 1758 | ||
1091 | 1759 | ||
@@ -1259,17 +1927,17 @@ struct host_func_stats { | |||
1259 | }; | 1927 | }; |
1260 | 1928 | ||
1261 | 1929 | ||
1262 | #define BCM_5710_FW_MAJOR_VERSION 5 | 1930 | #define BCM_5710_FW_MAJOR_VERSION 6 |
1263 | #define BCM_5710_FW_MINOR_VERSION 2 | 1931 | #define BCM_5710_FW_MINOR_VERSION 2 |
1264 | #define BCM_5710_FW_REVISION_VERSION 13 | 1932 | #define BCM_5710_FW_REVISION_VERSION 9 |
1265 | #define BCM_5710_FW_ENGINEERING_VERSION 0 | 1933 | #define BCM_5710_FW_ENGINEERING_VERSION 0 |
1266 | #define BCM_5710_FW_COMPILE_FLAGS 1 | 1934 | #define BCM_5710_FW_COMPILE_FLAGS 1 |
1267 | 1935 | ||
1268 | 1936 | ||
1269 | /* | 1937 | /* |
1270 | * attention bits | 1938 | * attention bits |
1271 | */ | 1939 | */ |
1272 | struct atten_def_status_block { | 1940 | struct atten_sp_status_block { |
1273 | __le32 attn_bits; | 1941 | __le32 attn_bits; |
1274 | __le32 attn_bits_ack; | 1942 | __le32 attn_bits_ack; |
1275 | u8 status_block_id; | 1943 | u8 status_block_id; |
@@ -1327,7 +1995,60 @@ struct doorbell_set_prod { | |||
1327 | 1995 | ||
1328 | 1996 | ||
1329 | /* | 1997 | /* |
1330 | * IGU driver acknowledgement register | 1998 | * 3 lines. status block |
1999 | */ | ||
2000 | struct hc_status_block_e1x { | ||
2001 | __le16 index_values[HC_SB_MAX_INDICES_E1X]; | ||
2002 | __le16 running_index[HC_SB_MAX_SM]; | ||
2003 | u32 rsrv; | ||
2004 | }; | ||
2005 | |||
2006 | /* | ||
2007 | * host status block | ||
2008 | */ | ||
2009 | struct host_hc_status_block_e1x { | ||
2010 | struct hc_status_block_e1x sb; | ||
2011 | }; | ||
2012 | |||
2013 | |||
2014 | /* | ||
2015 | * 3 lines. status block | ||
2016 | */ | ||
2017 | struct hc_status_block_e2 { | ||
2018 | __le16 index_values[HC_SB_MAX_INDICES_E2]; | ||
2019 | __le16 running_index[HC_SB_MAX_SM]; | ||
2020 | u32 reserved; | ||
2021 | }; | ||
2022 | |||
2023 | /* | ||
2024 | * host status block | ||
2025 | */ | ||
2026 | struct host_hc_status_block_e2 { | ||
2027 | struct hc_status_block_e2 sb; | ||
2028 | }; | ||
2029 | |||
2030 | |||
2031 | /* | ||
2032 | * 5 lines. slow-path status block | ||
2033 | */ | ||
2034 | struct hc_sp_status_block { | ||
2035 | __le16 index_values[HC_SP_SB_MAX_INDICES]; | ||
2036 | __le16 running_index; | ||
2037 | __le16 rsrv; | ||
2038 | u32 rsrv1; | ||
2039 | }; | ||
2040 | |||
2041 | /* | ||
2042 | * host status block | ||
2043 | */ | ||
2044 | struct host_sp_status_block { | ||
2045 | struct atten_sp_status_block atten_status_block; | ||
2046 | struct hc_sp_status_block sp_sb; | ||
2047 | }; | ||
2048 | |||
2049 | |||
2050 | /* | ||
2051 | * IGU driver acknowledgment register | ||
1331 | */ | 2052 | */ |
1332 | struct igu_ack_register { | 2053 | struct igu_ack_register { |
1333 | #if defined(__BIG_ENDIAN) | 2054 | #if defined(__BIG_ENDIAN) |
@@ -1417,6 +2138,24 @@ union igu_consprod_reg { | |||
1417 | 2138 | ||
1418 | 2139 | ||
1419 | /* | 2140 | /* |
2141 | * Control register for the IGU command register | ||
2142 | */ | ||
2143 | struct igu_ctrl_reg { | ||
2144 | u32 ctrl_data; | ||
2145 | #define IGU_CTRL_REG_ADDRESS (0xFFF<<0) | ||
2146 | #define IGU_CTRL_REG_ADDRESS_SHIFT 0 | ||
2147 | #define IGU_CTRL_REG_FID (0x7F<<12) | ||
2148 | #define IGU_CTRL_REG_FID_SHIFT 12 | ||
2149 | #define IGU_CTRL_REG_RESERVED (0x1<<19) | ||
2150 | #define IGU_CTRL_REG_RESERVED_SHIFT 19 | ||
2151 | #define IGU_CTRL_REG_TYPE (0x1<<20) | ||
2152 | #define IGU_CTRL_REG_TYPE_SHIFT 20 | ||
2153 | #define IGU_CTRL_REG_UNUSED (0x7FF<<21) | ||
2154 | #define IGU_CTRL_REG_UNUSED_SHIFT 21 | ||
2155 | }; | ||
2156 | |||
2157 | |||
2158 | /* | ||
1420 | * Parser parsing flags field | 2159 | * Parser parsing flags field |
1421 | */ | 2160 | */ |
1422 | struct parsing_flags { | 2161 | struct parsing_flags { |
@@ -1485,8 +2224,14 @@ struct dmae_command { | |||
1485 | #define DMAE_COMMAND_DST_RESET_SHIFT 14 | 2224 | #define DMAE_COMMAND_DST_RESET_SHIFT 14 |
1486 | #define DMAE_COMMAND_E1HVN (0x3<<15) | 2225 | #define DMAE_COMMAND_E1HVN (0x3<<15) |
1487 | #define DMAE_COMMAND_E1HVN_SHIFT 15 | 2226 | #define DMAE_COMMAND_E1HVN_SHIFT 15 |
1488 | #define DMAE_COMMAND_RESERVED0 (0x7FFF<<17) | 2227 | #define DMAE_COMMAND_DST_VN (0x3<<17) |
1489 | #define DMAE_COMMAND_RESERVED0_SHIFT 17 | 2228 | #define DMAE_COMMAND_DST_VN_SHIFT 17 |
2229 | #define DMAE_COMMAND_C_FUNC (0x1<<19) | ||
2230 | #define DMAE_COMMAND_C_FUNC_SHIFT 19 | ||
2231 | #define DMAE_COMMAND_ERR_POLICY (0x3<<20) | ||
2232 | #define DMAE_COMMAND_ERR_POLICY_SHIFT 20 | ||
2233 | #define DMAE_COMMAND_RESERVED0 (0x3FF<<22) | ||
2234 | #define DMAE_COMMAND_RESERVED0_SHIFT 22 | ||
1490 | u32 src_addr_lo; | 2235 | u32 src_addr_lo; |
1491 | u32 src_addr_hi; | 2236 | u32 src_addr_hi; |
1492 | u32 dst_addr_lo; | 2237 | u32 dst_addr_lo; |
@@ -1511,11 +2256,11 @@ struct dmae_command { | |||
1511 | u16 crc16_c; | 2256 | u16 crc16_c; |
1512 | #endif | 2257 | #endif |
1513 | #if defined(__BIG_ENDIAN) | 2258 | #if defined(__BIG_ENDIAN) |
1514 | u16 reserved2; | 2259 | u16 reserved3; |
1515 | u16 crc_t10; | 2260 | u16 crc_t10; |
1516 | #elif defined(__LITTLE_ENDIAN) | 2261 | #elif defined(__LITTLE_ENDIAN) |
1517 | u16 crc_t10; | 2262 | u16 crc_t10; |
1518 | u16 reserved2; | 2263 | u16 reserved3; |
1519 | #endif | 2264 | #endif |
1520 | #if defined(__BIG_ENDIAN) | 2265 | #if defined(__BIG_ENDIAN) |
1521 | u16 xsum8; | 2266 | u16 xsum8; |
@@ -1536,96 +2281,20 @@ struct double_regpair { | |||
1536 | 2281 | ||
1537 | 2282 | ||
1538 | /* | 2283 | /* |
1539 | * The eth storm context of Ustorm (configuration part) | 2284 | * SDM operation gen command (generate aggregative interrupt) |
1540 | */ | 2285 | */ |
1541 | struct ustorm_eth_st_context_config { | 2286 | struct sdm_op_gen { |
1542 | #if defined(__BIG_ENDIAN) | 2287 | __le32 command; |
1543 | u8 flags; | 2288 | #define SDM_OP_GEN_COMP_PARAM (0x1F<<0) |
1544 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_MC_ALIGNMENT (0x1<<0) | 2289 | #define SDM_OP_GEN_COMP_PARAM_SHIFT 0 |
1545 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_MC_ALIGNMENT_SHIFT 0 | 2290 | #define SDM_OP_GEN_COMP_TYPE (0x7<<5) |
1546 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_DYNAMIC_HC (0x1<<1) | 2291 | #define SDM_OP_GEN_COMP_TYPE_SHIFT 5 |
1547 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_DYNAMIC_HC_SHIFT 1 | 2292 | #define SDM_OP_GEN_AGG_VECT_IDX (0xFF<<8) |
1548 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_TPA (0x1<<2) | 2293 | #define SDM_OP_GEN_AGG_VECT_IDX_SHIFT 8 |
1549 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_TPA_SHIFT 2 | 2294 | #define SDM_OP_GEN_AGG_VECT_IDX_VALID (0x1<<16) |
1550 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_STATISTICS (0x1<<3) | 2295 | #define SDM_OP_GEN_AGG_VECT_IDX_VALID_SHIFT 16 |
1551 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_STATISTICS_SHIFT 3 | 2296 | #define SDM_OP_GEN_RESERVED (0x7FFF<<17) |
1552 | #define __USTORM_ETH_ST_CONTEXT_CONFIG_RESERVED0 (0xF<<4) | 2297 | #define SDM_OP_GEN_RESERVED_SHIFT 17 |
1553 | #define __USTORM_ETH_ST_CONTEXT_CONFIG_RESERVED0_SHIFT 4 | ||
1554 | u8 status_block_id; | ||
1555 | u8 clientId; | ||
1556 | u8 sb_index_numbers; | ||
1557 | #define USTORM_ETH_ST_CONTEXT_CONFIG_CQE_SB_INDEX_NUMBER (0xF<<0) | ||
1558 | #define USTORM_ETH_ST_CONTEXT_CONFIG_CQE_SB_INDEX_NUMBER_SHIFT 0 | ||
1559 | #define USTORM_ETH_ST_CONTEXT_CONFIG_BD_SB_INDEX_NUMBER (0xF<<4) | ||
1560 | #define USTORM_ETH_ST_CONTEXT_CONFIG_BD_SB_INDEX_NUMBER_SHIFT 4 | ||
1561 | #elif defined(__LITTLE_ENDIAN) | ||
1562 | u8 sb_index_numbers; | ||
1563 | #define USTORM_ETH_ST_CONTEXT_CONFIG_CQE_SB_INDEX_NUMBER (0xF<<0) | ||
1564 | #define USTORM_ETH_ST_CONTEXT_CONFIG_CQE_SB_INDEX_NUMBER_SHIFT 0 | ||
1565 | #define USTORM_ETH_ST_CONTEXT_CONFIG_BD_SB_INDEX_NUMBER (0xF<<4) | ||
1566 | #define USTORM_ETH_ST_CONTEXT_CONFIG_BD_SB_INDEX_NUMBER_SHIFT 4 | ||
1567 | u8 clientId; | ||
1568 | u8 status_block_id; | ||
1569 | u8 flags; | ||
1570 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_MC_ALIGNMENT (0x1<<0) | ||
1571 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_MC_ALIGNMENT_SHIFT 0 | ||
1572 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_DYNAMIC_HC (0x1<<1) | ||
1573 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_DYNAMIC_HC_SHIFT 1 | ||
1574 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_TPA (0x1<<2) | ||
1575 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_TPA_SHIFT 2 | ||
1576 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_STATISTICS (0x1<<3) | ||
1577 | #define USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_STATISTICS_SHIFT 3 | ||
1578 | #define __USTORM_ETH_ST_CONTEXT_CONFIG_RESERVED0 (0xF<<4) | ||
1579 | #define __USTORM_ETH_ST_CONTEXT_CONFIG_RESERVED0_SHIFT 4 | ||
1580 | #endif | ||
1581 | #if defined(__BIG_ENDIAN) | ||
1582 | u16 bd_buff_size; | ||
1583 | u8 statistics_counter_id; | ||
1584 | u8 mc_alignment_log_size; | ||
1585 | #elif defined(__LITTLE_ENDIAN) | ||
1586 | u8 mc_alignment_log_size; | ||
1587 | u8 statistics_counter_id; | ||
1588 | u16 bd_buff_size; | ||
1589 | #endif | ||
1590 | #if defined(__BIG_ENDIAN) | ||
1591 | u8 __local_sge_prod; | ||
1592 | u8 __local_bd_prod; | ||
1593 | u16 sge_buff_size; | ||
1594 | #elif defined(__LITTLE_ENDIAN) | ||
1595 | u16 sge_buff_size; | ||
1596 | u8 __local_bd_prod; | ||
1597 | u8 __local_sge_prod; | ||
1598 | #endif | ||
1599 | #if defined(__BIG_ENDIAN) | ||
1600 | u16 __sdm_bd_expected_counter; | ||
1601 | u8 cstorm_agg_int; | ||
1602 | u8 __expected_bds_on_ram; | ||
1603 | #elif defined(__LITTLE_ENDIAN) | ||
1604 | u8 __expected_bds_on_ram; | ||
1605 | u8 cstorm_agg_int; | ||
1606 | u16 __sdm_bd_expected_counter; | ||
1607 | #endif | ||
1608 | #if defined(__BIG_ENDIAN) | ||
1609 | u16 __ring_data_ram_addr; | ||
1610 | u16 __hc_cstorm_ram_addr; | ||
1611 | #elif defined(__LITTLE_ENDIAN) | ||
1612 | u16 __hc_cstorm_ram_addr; | ||
1613 | u16 __ring_data_ram_addr; | ||
1614 | #endif | ||
1615 | #if defined(__BIG_ENDIAN) | ||
1616 | u8 reserved1; | ||
1617 | u8 max_sges_for_packet; | ||
1618 | u16 __bd_ring_ram_addr; | ||
1619 | #elif defined(__LITTLE_ENDIAN) | ||
1620 | u16 __bd_ring_ram_addr; | ||
1621 | u8 max_sges_for_packet; | ||
1622 | u8 reserved1; | ||
1623 | #endif | ||
1624 | u32 bd_page_base_lo; | ||
1625 | u32 bd_page_base_hi; | ||
1626 | u32 sge_page_base_lo; | ||
1627 | u32 sge_page_base_hi; | ||
1628 | struct regpair reserved2; | ||
1629 | }; | 2298 | }; |
1630 | 2299 | ||
1631 | /* | 2300 | /* |
@@ -1644,20 +2313,13 @@ struct eth_rx_sge { | |||
1644 | __le32 addr_hi; | 2313 | __le32 addr_hi; |
1645 | }; | 2314 | }; |
1646 | 2315 | ||
1647 | /* | 2316 | |
1648 | * Local BDs and SGEs rings (in ETH) | ||
1649 | */ | ||
1650 | struct eth_local_rx_rings { | ||
1651 | struct eth_rx_bd __local_bd_ring[8]; | ||
1652 | struct eth_rx_sge __local_sge_ring[10]; | ||
1653 | }; | ||
1654 | 2317 | ||
1655 | /* | 2318 | /* |
1656 | * The eth storm context of Ustorm | 2319 | * The eth storm context of Ustorm |
1657 | */ | 2320 | */ |
1658 | struct ustorm_eth_st_context { | 2321 | struct ustorm_eth_st_context { |
1659 | struct ustorm_eth_st_context_config common; | 2322 | u32 reserved0[48]; |
1660 | struct eth_local_rx_rings __rings; | ||
1661 | }; | 2323 | }; |
1662 | 2324 | ||
1663 | /* | 2325 | /* |
@@ -1668,337 +2330,53 @@ struct tstorm_eth_st_context { | |||
1668 | }; | 2330 | }; |
1669 | 2331 | ||
1670 | /* | 2332 | /* |
1671 | * The eth aggregative context section of Xstorm | ||
1672 | */ | ||
1673 | struct xstorm_eth_extra_ag_context_section { | ||
1674 | #if defined(__BIG_ENDIAN) | ||
1675 | u8 __tcp_agg_vars1; | ||
1676 | u8 __reserved50; | ||
1677 | u16 __mss; | ||
1678 | #elif defined(__LITTLE_ENDIAN) | ||
1679 | u16 __mss; | ||
1680 | u8 __reserved50; | ||
1681 | u8 __tcp_agg_vars1; | ||
1682 | #endif | ||
1683 | u32 __snd_nxt; | ||
1684 | u32 __tx_wnd; | ||
1685 | u32 __snd_una; | ||
1686 | u32 __reserved53; | ||
1687 | #if defined(__BIG_ENDIAN) | ||
1688 | u8 __agg_val8_th; | ||
1689 | u8 __agg_val8; | ||
1690 | u16 __tcp_agg_vars2; | ||
1691 | #elif defined(__LITTLE_ENDIAN) | ||
1692 | u16 __tcp_agg_vars2; | ||
1693 | u8 __agg_val8; | ||
1694 | u8 __agg_val8_th; | ||
1695 | #endif | ||
1696 | u32 __reserved58; | ||
1697 | u32 __reserved59; | ||
1698 | u32 __reserved60; | ||
1699 | u32 __reserved61; | ||
1700 | #if defined(__BIG_ENDIAN) | ||
1701 | u16 __agg_val7_th; | ||
1702 | u16 __agg_val7; | ||
1703 | #elif defined(__LITTLE_ENDIAN) | ||
1704 | u16 __agg_val7; | ||
1705 | u16 __agg_val7_th; | ||
1706 | #endif | ||
1707 | #if defined(__BIG_ENDIAN) | ||
1708 | u8 __tcp_agg_vars5; | ||
1709 | u8 __tcp_agg_vars4; | ||
1710 | u8 __tcp_agg_vars3; | ||
1711 | u8 __reserved62; | ||
1712 | #elif defined(__LITTLE_ENDIAN) | ||
1713 | u8 __reserved62; | ||
1714 | u8 __tcp_agg_vars3; | ||
1715 | u8 __tcp_agg_vars4; | ||
1716 | u8 __tcp_agg_vars5; | ||
1717 | #endif | ||
1718 | u32 __tcp_agg_vars6; | ||
1719 | #if defined(__BIG_ENDIAN) | ||
1720 | u16 __agg_misc6; | ||
1721 | u16 __tcp_agg_vars7; | ||
1722 | #elif defined(__LITTLE_ENDIAN) | ||
1723 | u16 __tcp_agg_vars7; | ||
1724 | u16 __agg_misc6; | ||
1725 | #endif | ||
1726 | u32 __agg_val10; | ||
1727 | u32 __agg_val10_th; | ||
1728 | #if defined(__BIG_ENDIAN) | ||
1729 | u16 __reserved3; | ||
1730 | u8 __reserved2; | ||
1731 | u8 __da_only_cnt; | ||
1732 | #elif defined(__LITTLE_ENDIAN) | ||
1733 | u8 __da_only_cnt; | ||
1734 | u8 __reserved2; | ||
1735 | u16 __reserved3; | ||
1736 | #endif | ||
1737 | }; | ||
1738 | |||
1739 | /* | ||
1740 | * The eth aggregative context of Xstorm | 2333 | * The eth aggregative context of Xstorm |
1741 | */ | 2334 | */ |
1742 | struct xstorm_eth_ag_context { | 2335 | struct xstorm_eth_ag_context { |
1743 | #if defined(__BIG_ENDIAN) | 2336 | u32 reserved0; |
1744 | u16 agg_val1; | ||
1745 | u8 __agg_vars1; | ||
1746 | u8 __state; | ||
1747 | #elif defined(__LITTLE_ENDIAN) | ||
1748 | u8 __state; | ||
1749 | u8 __agg_vars1; | ||
1750 | u16 agg_val1; | ||
1751 | #endif | ||
1752 | #if defined(__BIG_ENDIAN) | 2337 | #if defined(__BIG_ENDIAN) |
1753 | u8 cdu_reserved; | 2338 | u8 cdu_reserved; |
1754 | u8 __agg_vars4; | 2339 | u8 reserved2; |
1755 | u8 __agg_vars3; | 2340 | u16 reserved1; |
1756 | u8 __agg_vars2; | ||
1757 | #elif defined(__LITTLE_ENDIAN) | 2341 | #elif defined(__LITTLE_ENDIAN) |
1758 | u8 __agg_vars2; | 2342 | u16 reserved1; |
1759 | u8 __agg_vars3; | 2343 | u8 reserved2; |
1760 | u8 __agg_vars4; | ||
1761 | u8 cdu_reserved; | 2344 | u8 cdu_reserved; |
1762 | #endif | 2345 | #endif |
1763 | u32 __bd_prod; | 2346 | u32 reserved3[30]; |
1764 | #if defined(__BIG_ENDIAN) | ||
1765 | u16 __agg_vars5; | ||
1766 | u16 __agg_val4_th; | ||
1767 | #elif defined(__LITTLE_ENDIAN) | ||
1768 | u16 __agg_val4_th; | ||
1769 | u16 __agg_vars5; | ||
1770 | #endif | ||
1771 | struct xstorm_eth_extra_ag_context_section __extra_section; | ||
1772 | #if defined(__BIG_ENDIAN) | ||
1773 | u16 __agg_vars7; | ||
1774 | u8 __agg_val3_th; | ||
1775 | u8 __agg_vars6; | ||
1776 | #elif defined(__LITTLE_ENDIAN) | ||
1777 | u8 __agg_vars6; | ||
1778 | u8 __agg_val3_th; | ||
1779 | u16 __agg_vars7; | ||
1780 | #endif | ||
1781 | #if defined(__BIG_ENDIAN) | ||
1782 | u16 __agg_val11_th; | ||
1783 | u16 __agg_val11; | ||
1784 | #elif defined(__LITTLE_ENDIAN) | ||
1785 | u16 __agg_val11; | ||
1786 | u16 __agg_val11_th; | ||
1787 | #endif | ||
1788 | #if defined(__BIG_ENDIAN) | ||
1789 | u8 __reserved1; | ||
1790 | u8 __agg_val6_th; | ||
1791 | u16 __agg_val9; | ||
1792 | #elif defined(__LITTLE_ENDIAN) | ||
1793 | u16 __agg_val9; | ||
1794 | u8 __agg_val6_th; | ||
1795 | u8 __reserved1; | ||
1796 | #endif | ||
1797 | #if defined(__BIG_ENDIAN) | ||
1798 | u16 __agg_val2_th; | ||
1799 | u16 __agg_val2; | ||
1800 | #elif defined(__LITTLE_ENDIAN) | ||
1801 | u16 __agg_val2; | ||
1802 | u16 __agg_val2_th; | ||
1803 | #endif | ||
1804 | u32 __agg_vars8; | ||
1805 | #if defined(__BIG_ENDIAN) | ||
1806 | u16 __agg_misc0; | ||
1807 | u16 __agg_val4; | ||
1808 | #elif defined(__LITTLE_ENDIAN) | ||
1809 | u16 __agg_val4; | ||
1810 | u16 __agg_misc0; | ||
1811 | #endif | ||
1812 | #if defined(__BIG_ENDIAN) | ||
1813 | u8 __agg_val3; | ||
1814 | u8 __agg_val6; | ||
1815 | u8 __agg_val5_th; | ||
1816 | u8 __agg_val5; | ||
1817 | #elif defined(__LITTLE_ENDIAN) | ||
1818 | u8 __agg_val5; | ||
1819 | u8 __agg_val5_th; | ||
1820 | u8 __agg_val6; | ||
1821 | u8 __agg_val3; | ||
1822 | #endif | ||
1823 | #if defined(__BIG_ENDIAN) | ||
1824 | u16 __agg_misc1; | ||
1825 | u16 __bd_ind_max_val; | ||
1826 | #elif defined(__LITTLE_ENDIAN) | ||
1827 | u16 __bd_ind_max_val; | ||
1828 | u16 __agg_misc1; | ||
1829 | #endif | ||
1830 | u32 __reserved57; | ||
1831 | u32 __agg_misc4; | ||
1832 | u32 __agg_misc5; | ||
1833 | }; | ||
1834 | |||
1835 | /* | ||
1836 | * The eth extra aggregative context section of Tstorm | ||
1837 | */ | ||
1838 | struct tstorm_eth_extra_ag_context_section { | ||
1839 | u32 __agg_val1; | ||
1840 | #if defined(__BIG_ENDIAN) | ||
1841 | u8 __tcp_agg_vars2; | ||
1842 | u8 __agg_val3; | ||
1843 | u16 __agg_val2; | ||
1844 | #elif defined(__LITTLE_ENDIAN) | ||
1845 | u16 __agg_val2; | ||
1846 | u8 __agg_val3; | ||
1847 | u8 __tcp_agg_vars2; | ||
1848 | #endif | ||
1849 | #if defined(__BIG_ENDIAN) | ||
1850 | u16 __agg_val5; | ||
1851 | u8 __agg_val6; | ||
1852 | u8 __tcp_agg_vars3; | ||
1853 | #elif defined(__LITTLE_ENDIAN) | ||
1854 | u8 __tcp_agg_vars3; | ||
1855 | u8 __agg_val6; | ||
1856 | u16 __agg_val5; | ||
1857 | #endif | ||
1858 | u32 __reserved63; | ||
1859 | u32 __reserved64; | ||
1860 | u32 __reserved65; | ||
1861 | u32 __reserved66; | ||
1862 | u32 __reserved67; | ||
1863 | u32 __tcp_agg_vars1; | ||
1864 | u32 __reserved61; | ||
1865 | u32 __reserved62; | ||
1866 | u32 __reserved2; | ||
1867 | }; | 2347 | }; |
1868 | 2348 | ||
1869 | /* | 2349 | /* |
1870 | * The eth aggregative context of Tstorm | 2350 | * The eth aggregative context of Tstorm |
1871 | */ | 2351 | */ |
1872 | struct tstorm_eth_ag_context { | 2352 | struct tstorm_eth_ag_context { |
1873 | #if defined(__BIG_ENDIAN) | 2353 | u32 __reserved0[14]; |
1874 | u16 __reserved54; | ||
1875 | u8 __agg_vars1; | ||
1876 | u8 __state; | ||
1877 | #elif defined(__LITTLE_ENDIAN) | ||
1878 | u8 __state; | ||
1879 | u8 __agg_vars1; | ||
1880 | u16 __reserved54; | ||
1881 | #endif | ||
1882 | #if defined(__BIG_ENDIAN) | ||
1883 | u16 __agg_val4; | ||
1884 | u16 __agg_vars2; | ||
1885 | #elif defined(__LITTLE_ENDIAN) | ||
1886 | u16 __agg_vars2; | ||
1887 | u16 __agg_val4; | ||
1888 | #endif | ||
1889 | struct tstorm_eth_extra_ag_context_section __extra_section; | ||
1890 | }; | 2354 | }; |
1891 | 2355 | ||
2356 | |||
1892 | /* | 2357 | /* |
1893 | * The eth aggregative context of Cstorm | 2358 | * The eth aggregative context of Cstorm |
1894 | */ | 2359 | */ |
1895 | struct cstorm_eth_ag_context { | 2360 | struct cstorm_eth_ag_context { |
1896 | u32 __agg_vars1; | 2361 | u32 __reserved0[10]; |
1897 | #if defined(__BIG_ENDIAN) | ||
1898 | u8 __aux1_th; | ||
1899 | u8 __aux1_val; | ||
1900 | u16 __agg_vars2; | ||
1901 | #elif defined(__LITTLE_ENDIAN) | ||
1902 | u16 __agg_vars2; | ||
1903 | u8 __aux1_val; | ||
1904 | u8 __aux1_th; | ||
1905 | #endif | ||
1906 | u32 __num_of_treated_packet; | ||
1907 | u32 __last_packet_treated; | ||
1908 | #if defined(__BIG_ENDIAN) | ||
1909 | u16 __reserved58; | ||
1910 | u16 __reserved57; | ||
1911 | #elif defined(__LITTLE_ENDIAN) | ||
1912 | u16 __reserved57; | ||
1913 | u16 __reserved58; | ||
1914 | #endif | ||
1915 | #if defined(__BIG_ENDIAN) | ||
1916 | u8 __reserved62; | ||
1917 | u8 __reserved61; | ||
1918 | u8 __reserved60; | ||
1919 | u8 __reserved59; | ||
1920 | #elif defined(__LITTLE_ENDIAN) | ||
1921 | u8 __reserved59; | ||
1922 | u8 __reserved60; | ||
1923 | u8 __reserved61; | ||
1924 | u8 __reserved62; | ||
1925 | #endif | ||
1926 | #if defined(__BIG_ENDIAN) | ||
1927 | u16 __reserved64; | ||
1928 | u16 __reserved63; | ||
1929 | #elif defined(__LITTLE_ENDIAN) | ||
1930 | u16 __reserved63; | ||
1931 | u16 __reserved64; | ||
1932 | #endif | ||
1933 | u32 __reserved65; | ||
1934 | #if defined(__BIG_ENDIAN) | ||
1935 | u16 __agg_vars3; | ||
1936 | u16 __rq_inv_cnt; | ||
1937 | #elif defined(__LITTLE_ENDIAN) | ||
1938 | u16 __rq_inv_cnt; | ||
1939 | u16 __agg_vars3; | ||
1940 | #endif | ||
1941 | #if defined(__BIG_ENDIAN) | ||
1942 | u16 __packet_index_th; | ||
1943 | u16 __packet_index; | ||
1944 | #elif defined(__LITTLE_ENDIAN) | ||
1945 | u16 __packet_index; | ||
1946 | u16 __packet_index_th; | ||
1947 | #endif | ||
1948 | }; | 2362 | }; |
1949 | 2363 | ||
2364 | |||
1950 | /* | 2365 | /* |
1951 | * The eth aggregative context of Ustorm | 2366 | * The eth aggregative context of Ustorm |
1952 | */ | 2367 | */ |
1953 | struct ustorm_eth_ag_context { | 2368 | struct ustorm_eth_ag_context { |
1954 | #if defined(__BIG_ENDIAN) | 2369 | u32 __reserved0; |
1955 | u8 __aux_counter_flags; | ||
1956 | u8 __agg_vars2; | ||
1957 | u8 __agg_vars1; | ||
1958 | u8 __state; | ||
1959 | #elif defined(__LITTLE_ENDIAN) | ||
1960 | u8 __state; | ||
1961 | u8 __agg_vars1; | ||
1962 | u8 __agg_vars2; | ||
1963 | u8 __aux_counter_flags; | ||
1964 | #endif | ||
1965 | #if defined(__BIG_ENDIAN) | 2370 | #if defined(__BIG_ENDIAN) |
1966 | u8 cdu_usage; | 2371 | u8 cdu_usage; |
1967 | u8 __agg_misc2; | 2372 | u8 __reserved2; |
1968 | u16 __agg_misc1; | 2373 | u16 __reserved1; |
1969 | #elif defined(__LITTLE_ENDIAN) | 2374 | #elif defined(__LITTLE_ENDIAN) |
1970 | u16 __agg_misc1; | 2375 | u16 __reserved1; |
1971 | u8 __agg_misc2; | 2376 | u8 __reserved2; |
1972 | u8 cdu_usage; | 2377 | u8 cdu_usage; |
1973 | #endif | 2378 | #endif |
1974 | u32 __agg_misc4; | 2379 | u32 __reserved3[6]; |
1975 | #if defined(__BIG_ENDIAN) | ||
1976 | u8 __agg_val3_th; | ||
1977 | u8 __agg_val3; | ||
1978 | u16 __agg_misc3; | ||
1979 | #elif defined(__LITTLE_ENDIAN) | ||
1980 | u16 __agg_misc3; | ||
1981 | u8 __agg_val3; | ||
1982 | u8 __agg_val3_th; | ||
1983 | #endif | ||
1984 | u32 __agg_val1; | ||
1985 | u32 __agg_misc4_th; | ||
1986 | #if defined(__BIG_ENDIAN) | ||
1987 | u16 __agg_val2_th; | ||
1988 | u16 __agg_val2; | ||
1989 | #elif defined(__LITTLE_ENDIAN) | ||
1990 | u16 __agg_val2; | ||
1991 | u16 __agg_val2_th; | ||
1992 | #endif | ||
1993 | #if defined(__BIG_ENDIAN) | ||
1994 | u16 __reserved2; | ||
1995 | u8 __decision_rules; | ||
1996 | u8 __decision_rule_enable_bits; | ||
1997 | #elif defined(__LITTLE_ENDIAN) | ||
1998 | u8 __decision_rule_enable_bits; | ||
1999 | u8 __decision_rules; | ||
2000 | u16 __reserved2; | ||
2001 | #endif | ||
2002 | }; | 2380 | }; |
2003 | 2381 | ||
2004 | /* | 2382 | /* |
@@ -2022,18 +2400,16 @@ struct timers_block_context { | |||
2022 | */ | 2400 | */ |
2023 | struct eth_tx_bd_flags { | 2401 | struct eth_tx_bd_flags { |
2024 | u8 as_bitfield; | 2402 | u8 as_bitfield; |
2025 | #define ETH_TX_BD_FLAGS_VLAN_TAG (0x1<<0) | 2403 | #define ETH_TX_BD_FLAGS_IP_CSUM (0x1<<0) |
2026 | #define ETH_TX_BD_FLAGS_VLAN_TAG_SHIFT 0 | 2404 | #define ETH_TX_BD_FLAGS_IP_CSUM_SHIFT 0 |
2027 | #define ETH_TX_BD_FLAGS_IP_CSUM (0x1<<1) | 2405 | #define ETH_TX_BD_FLAGS_L4_CSUM (0x1<<1) |
2028 | #define ETH_TX_BD_FLAGS_IP_CSUM_SHIFT 1 | 2406 | #define ETH_TX_BD_FLAGS_L4_CSUM_SHIFT 1 |
2029 | #define ETH_TX_BD_FLAGS_L4_CSUM (0x1<<2) | 2407 | #define ETH_TX_BD_FLAGS_VLAN_MODE (0x3<<2) |
2030 | #define ETH_TX_BD_FLAGS_L4_CSUM_SHIFT 2 | 2408 | #define ETH_TX_BD_FLAGS_VLAN_MODE_SHIFT 2 |
2031 | #define ETH_TX_BD_FLAGS_END_BD (0x1<<3) | ||
2032 | #define ETH_TX_BD_FLAGS_END_BD_SHIFT 3 | ||
2033 | #define ETH_TX_BD_FLAGS_START_BD (0x1<<4) | 2409 | #define ETH_TX_BD_FLAGS_START_BD (0x1<<4) |
2034 | #define ETH_TX_BD_FLAGS_START_BD_SHIFT 4 | 2410 | #define ETH_TX_BD_FLAGS_START_BD_SHIFT 4 |
2035 | #define ETH_TX_BD_FLAGS_HDR_POOL (0x1<<5) | 2411 | #define ETH_TX_BD_FLAGS_IS_UDP (0x1<<5) |
2036 | #define ETH_TX_BD_FLAGS_HDR_POOL_SHIFT 5 | 2412 | #define ETH_TX_BD_FLAGS_IS_UDP_SHIFT 5 |
2037 | #define ETH_TX_BD_FLAGS_SW_LSO (0x1<<6) | 2413 | #define ETH_TX_BD_FLAGS_SW_LSO (0x1<<6) |
2038 | #define ETH_TX_BD_FLAGS_SW_LSO_SHIFT 6 | 2414 | #define ETH_TX_BD_FLAGS_SW_LSO_SHIFT 6 |
2039 | #define ETH_TX_BD_FLAGS_IPV6 (0x1<<7) | 2415 | #define ETH_TX_BD_FLAGS_IPV6 (0x1<<7) |
@@ -2048,7 +2424,7 @@ struct eth_tx_start_bd { | |||
2048 | __le32 addr_hi; | 2424 | __le32 addr_hi; |
2049 | __le16 nbd; | 2425 | __le16 nbd; |
2050 | __le16 nbytes; | 2426 | __le16 nbytes; |
2051 | __le16 vlan; | 2427 | __le16 vlan_or_ethertype; |
2052 | struct eth_tx_bd_flags bd_flags; | 2428 | struct eth_tx_bd_flags bd_flags; |
2053 | u8 general_data; | 2429 | u8 general_data; |
2054 | #define ETH_TX_START_BD_HDR_NBDS (0x3F<<0) | 2430 | #define ETH_TX_START_BD_HDR_NBDS (0x3F<<0) |
@@ -2061,48 +2437,48 @@ struct eth_tx_start_bd { | |||
2061 | * Tx regular BD structure | 2437 | * Tx regular BD structure |
2062 | */ | 2438 | */ |
2063 | struct eth_tx_bd { | 2439 | struct eth_tx_bd { |
2064 | u32 addr_lo; | 2440 | __le32 addr_lo; |
2065 | u32 addr_hi; | 2441 | __le32 addr_hi; |
2066 | u16 total_pkt_bytes; | 2442 | __le16 total_pkt_bytes; |
2067 | u16 nbytes; | 2443 | __le16 nbytes; |
2068 | u8 reserved[4]; | 2444 | u8 reserved[4]; |
2069 | }; | 2445 | }; |
2070 | 2446 | ||
2071 | /* | 2447 | /* |
2072 | * Tx parsing BD structure for ETH,Relevant in START | 2448 | * Tx parsing BD structure for ETH E1/E1h |
2073 | */ | 2449 | */ |
2074 | struct eth_tx_parse_bd { | 2450 | struct eth_tx_parse_bd_e1x { |
2075 | u8 global_data; | 2451 | u8 global_data; |
2076 | #define ETH_TX_PARSE_BD_IP_HDR_START_OFFSET (0xF<<0) | 2452 | #define ETH_TX_PARSE_BD_E1X_IP_HDR_START_OFFSET_W (0xF<<0) |
2077 | #define ETH_TX_PARSE_BD_IP_HDR_START_OFFSET_SHIFT 0 | 2453 | #define ETH_TX_PARSE_BD_E1X_IP_HDR_START_OFFSET_W_SHIFT 0 |
2078 | #define ETH_TX_PARSE_BD_UDP_CS_FLG (0x1<<4) | 2454 | #define ETH_TX_PARSE_BD_E1X_RESERVED0 (0x1<<4) |
2079 | #define ETH_TX_PARSE_BD_UDP_CS_FLG_SHIFT 4 | 2455 | #define ETH_TX_PARSE_BD_E1X_RESERVED0_SHIFT 4 |
2080 | #define ETH_TX_PARSE_BD_PSEUDO_CS_WITHOUT_LEN (0x1<<5) | 2456 | #define ETH_TX_PARSE_BD_E1X_PSEUDO_CS_WITHOUT_LEN (0x1<<5) |
2081 | #define ETH_TX_PARSE_BD_PSEUDO_CS_WITHOUT_LEN_SHIFT 5 | 2457 | #define ETH_TX_PARSE_BD_E1X_PSEUDO_CS_WITHOUT_LEN_SHIFT 5 |
2082 | #define ETH_TX_PARSE_BD_LLC_SNAP_EN (0x1<<6) | 2458 | #define ETH_TX_PARSE_BD_E1X_LLC_SNAP_EN (0x1<<6) |
2083 | #define ETH_TX_PARSE_BD_LLC_SNAP_EN_SHIFT 6 | 2459 | #define ETH_TX_PARSE_BD_E1X_LLC_SNAP_EN_SHIFT 6 |
2084 | #define ETH_TX_PARSE_BD_NS_FLG (0x1<<7) | 2460 | #define ETH_TX_PARSE_BD_E1X_NS_FLG (0x1<<7) |
2085 | #define ETH_TX_PARSE_BD_NS_FLG_SHIFT 7 | 2461 | #define ETH_TX_PARSE_BD_E1X_NS_FLG_SHIFT 7 |
2086 | u8 tcp_flags; | 2462 | u8 tcp_flags; |
2087 | #define ETH_TX_PARSE_BD_FIN_FLG (0x1<<0) | 2463 | #define ETH_TX_PARSE_BD_E1X_FIN_FLG (0x1<<0) |
2088 | #define ETH_TX_PARSE_BD_FIN_FLG_SHIFT 0 | 2464 | #define ETH_TX_PARSE_BD_E1X_FIN_FLG_SHIFT 0 |
2089 | #define ETH_TX_PARSE_BD_SYN_FLG (0x1<<1) | 2465 | #define ETH_TX_PARSE_BD_E1X_SYN_FLG (0x1<<1) |
2090 | #define ETH_TX_PARSE_BD_SYN_FLG_SHIFT 1 | 2466 | #define ETH_TX_PARSE_BD_E1X_SYN_FLG_SHIFT 1 |
2091 | #define ETH_TX_PARSE_BD_RST_FLG (0x1<<2) | 2467 | #define ETH_TX_PARSE_BD_E1X_RST_FLG (0x1<<2) |
2092 | #define ETH_TX_PARSE_BD_RST_FLG_SHIFT 2 | 2468 | #define ETH_TX_PARSE_BD_E1X_RST_FLG_SHIFT 2 |
2093 | #define ETH_TX_PARSE_BD_PSH_FLG (0x1<<3) | 2469 | #define ETH_TX_PARSE_BD_E1X_PSH_FLG (0x1<<3) |
2094 | #define ETH_TX_PARSE_BD_PSH_FLG_SHIFT 3 | 2470 | #define ETH_TX_PARSE_BD_E1X_PSH_FLG_SHIFT 3 |
2095 | #define ETH_TX_PARSE_BD_ACK_FLG (0x1<<4) | 2471 | #define ETH_TX_PARSE_BD_E1X_ACK_FLG (0x1<<4) |
2096 | #define ETH_TX_PARSE_BD_ACK_FLG_SHIFT 4 | 2472 | #define ETH_TX_PARSE_BD_E1X_ACK_FLG_SHIFT 4 |
2097 | #define ETH_TX_PARSE_BD_URG_FLG (0x1<<5) | 2473 | #define ETH_TX_PARSE_BD_E1X_URG_FLG (0x1<<5) |
2098 | #define ETH_TX_PARSE_BD_URG_FLG_SHIFT 5 | 2474 | #define ETH_TX_PARSE_BD_E1X_URG_FLG_SHIFT 5 |
2099 | #define ETH_TX_PARSE_BD_ECE_FLG (0x1<<6) | 2475 | #define ETH_TX_PARSE_BD_E1X_ECE_FLG (0x1<<6) |
2100 | #define ETH_TX_PARSE_BD_ECE_FLG_SHIFT 6 | 2476 | #define ETH_TX_PARSE_BD_E1X_ECE_FLG_SHIFT 6 |
2101 | #define ETH_TX_PARSE_BD_CWR_FLG (0x1<<7) | 2477 | #define ETH_TX_PARSE_BD_E1X_CWR_FLG (0x1<<7) |
2102 | #define ETH_TX_PARSE_BD_CWR_FLG_SHIFT 7 | 2478 | #define ETH_TX_PARSE_BD_E1X_CWR_FLG_SHIFT 7 |
2103 | u8 ip_hlen; | 2479 | u8 ip_hlen_w; |
2104 | s8 reserved; | 2480 | s8 reserved; |
2105 | __le16 total_hlen; | 2481 | __le16 total_hlen_w; |
2106 | __le16 tcp_pseudo_csum; | 2482 | __le16 tcp_pseudo_csum; |
2107 | __le16 lso_mss; | 2483 | __le16 lso_mss; |
2108 | __le16 ip_id; | 2484 | __le16 ip_id; |
@@ -2110,6 +2486,27 @@ struct eth_tx_parse_bd { | |||
2110 | }; | 2486 | }; |
2111 | 2487 | ||
2112 | /* | 2488 | /* |
2489 | * Tx parsing BD structure for ETH E2 | ||
2490 | */ | ||
2491 | struct eth_tx_parse_bd_e2 { | ||
2492 | __le16 dst_mac_addr_lo; | ||
2493 | __le16 dst_mac_addr_mid; | ||
2494 | __le16 dst_mac_addr_hi; | ||
2495 | __le16 src_mac_addr_lo; | ||
2496 | __le16 src_mac_addr_mid; | ||
2497 | __le16 src_mac_addr_hi; | ||
2498 | __le32 parsing_data; | ||
2499 | #define ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W (0x1FFF<<0) | ||
2500 | #define ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W_SHIFT 0 | ||
2501 | #define ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW (0xF<<13) | ||
2502 | #define ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW_SHIFT 13 | ||
2503 | #define ETH_TX_PARSE_BD_E2_LSO_MSS (0x3FFF<<17) | ||
2504 | #define ETH_TX_PARSE_BD_E2_LSO_MSS_SHIFT 17 | ||
2505 | #define ETH_TX_PARSE_BD_E2_IPV6_WITH_EXT_HDR (0x1<<31) | ||
2506 | #define ETH_TX_PARSE_BD_E2_IPV6_WITH_EXT_HDR_SHIFT 31 | ||
2507 | }; | ||
2508 | |||
2509 | /* | ||
2113 | * The last BD in the BD memory will hold a pointer to the next BD memory | 2510 | * The last BD in the BD memory will hold a pointer to the next BD memory |
2114 | */ | 2511 | */ |
2115 | struct eth_tx_next_bd { | 2512 | struct eth_tx_next_bd { |
@@ -2124,79 +2521,24 @@ struct eth_tx_next_bd { | |||
2124 | union eth_tx_bd_types { | 2521 | union eth_tx_bd_types { |
2125 | struct eth_tx_start_bd start_bd; | 2522 | struct eth_tx_start_bd start_bd; |
2126 | struct eth_tx_bd reg_bd; | 2523 | struct eth_tx_bd reg_bd; |
2127 | struct eth_tx_parse_bd parse_bd; | 2524 | struct eth_tx_parse_bd_e1x parse_bd_e1x; |
2525 | struct eth_tx_parse_bd_e2 parse_bd_e2; | ||
2128 | struct eth_tx_next_bd next_bd; | 2526 | struct eth_tx_next_bd next_bd; |
2129 | }; | 2527 | }; |
2130 | 2528 | ||
2529 | |||
2131 | /* | 2530 | /* |
2132 | * The eth storm context of Xstorm | 2531 | * The eth storm context of Xstorm |
2133 | */ | 2532 | */ |
2134 | struct xstorm_eth_st_context { | 2533 | struct xstorm_eth_st_context { |
2135 | u32 tx_bd_page_base_lo; | 2534 | u32 reserved0[60]; |
2136 | u32 tx_bd_page_base_hi; | ||
2137 | #if defined(__BIG_ENDIAN) | ||
2138 | u16 tx_bd_cons; | ||
2139 | u8 statistics_data; | ||
2140 | #define XSTORM_ETH_ST_CONTEXT_STATISTICS_COUNTER_ID (0x7F<<0) | ||
2141 | #define XSTORM_ETH_ST_CONTEXT_STATISTICS_COUNTER_ID_SHIFT 0 | ||
2142 | #define XSTORM_ETH_ST_CONTEXT_STATISTICS_ENABLE (0x1<<7) | ||
2143 | #define XSTORM_ETH_ST_CONTEXT_STATISTICS_ENABLE_SHIFT 7 | ||
2144 | u8 __local_tx_bd_prod; | ||
2145 | #elif defined(__LITTLE_ENDIAN) | ||
2146 | u8 __local_tx_bd_prod; | ||
2147 | u8 statistics_data; | ||
2148 | #define XSTORM_ETH_ST_CONTEXT_STATISTICS_COUNTER_ID (0x7F<<0) | ||
2149 | #define XSTORM_ETH_ST_CONTEXT_STATISTICS_COUNTER_ID_SHIFT 0 | ||
2150 | #define XSTORM_ETH_ST_CONTEXT_STATISTICS_ENABLE (0x1<<7) | ||
2151 | #define XSTORM_ETH_ST_CONTEXT_STATISTICS_ENABLE_SHIFT 7 | ||
2152 | u16 tx_bd_cons; | ||
2153 | #endif | ||
2154 | u32 __reserved1; | ||
2155 | u32 __reserved2; | ||
2156 | #if defined(__BIG_ENDIAN) | ||
2157 | u8 __ram_cache_index; | ||
2158 | u8 __double_buffer_client; | ||
2159 | u16 __pkt_cons; | ||
2160 | #elif defined(__LITTLE_ENDIAN) | ||
2161 | u16 __pkt_cons; | ||
2162 | u8 __double_buffer_client; | ||
2163 | u8 __ram_cache_index; | ||
2164 | #endif | ||
2165 | #if defined(__BIG_ENDIAN) | ||
2166 | u16 __statistics_address; | ||
2167 | u16 __gso_next; | ||
2168 | #elif defined(__LITTLE_ENDIAN) | ||
2169 | u16 __gso_next; | ||
2170 | u16 __statistics_address; | ||
2171 | #endif | ||
2172 | #if defined(__BIG_ENDIAN) | ||
2173 | u8 __local_tx_bd_cons; | ||
2174 | u8 safc_group_num; | ||
2175 | u8 safc_group_en; | ||
2176 | u8 __is_eth_conn; | ||
2177 | #elif defined(__LITTLE_ENDIAN) | ||
2178 | u8 __is_eth_conn; | ||
2179 | u8 safc_group_en; | ||
2180 | u8 safc_group_num; | ||
2181 | u8 __local_tx_bd_cons; | ||
2182 | #endif | ||
2183 | union eth_tx_bd_types __bds[13]; | ||
2184 | }; | 2535 | }; |
2185 | 2536 | ||
2186 | /* | 2537 | /* |
2187 | * The eth storm context of Cstorm | 2538 | * The eth storm context of Cstorm |
2188 | */ | 2539 | */ |
2189 | struct cstorm_eth_st_context { | 2540 | struct cstorm_eth_st_context { |
2190 | #if defined(__BIG_ENDIAN) | 2541 | u32 __reserved0[4]; |
2191 | u16 __reserved0; | ||
2192 | u8 sb_index_number; | ||
2193 | u8 status_block_id; | ||
2194 | #elif defined(__LITTLE_ENDIAN) | ||
2195 | u8 status_block_id; | ||
2196 | u8 sb_index_number; | ||
2197 | u16 __reserved0; | ||
2198 | #endif | ||
2199 | u32 __reserved1[3]; | ||
2200 | }; | 2542 | }; |
2201 | 2543 | ||
2202 | /* | 2544 | /* |
@@ -2244,103 +2586,114 @@ struct eth_tx_doorbell { | |||
2244 | 2586 | ||
2245 | 2587 | ||
2246 | /* | 2588 | /* |
2247 | * cstorm default status block, generated by ustorm | 2589 | * client init fc data |
2248 | */ | ||
2249 | struct cstorm_def_status_block_u { | ||
2250 | __le16 index_values[HC_USTORM_DEF_SB_NUM_INDICES]; | ||
2251 | __le16 status_block_index; | ||
2252 | u8 func; | ||
2253 | u8 status_block_id; | ||
2254 | __le32 __flags; | ||
2255 | }; | ||
2256 | |||
2257 | /* | ||
2258 | * cstorm default status block, generated by cstorm | ||
2259 | */ | ||
2260 | struct cstorm_def_status_block_c { | ||
2261 | __le16 index_values[HC_CSTORM_DEF_SB_NUM_INDICES]; | ||
2262 | __le16 status_block_index; | ||
2263 | u8 func; | ||
2264 | u8 status_block_id; | ||
2265 | __le32 __flags; | ||
2266 | }; | ||
2267 | |||
2268 | /* | ||
2269 | * xstorm status block | ||
2270 | */ | 2590 | */ |
2271 | struct xstorm_def_status_block { | 2591 | struct client_init_fc_data { |
2272 | __le16 index_values[HC_XSTORM_DEF_SB_NUM_INDICES]; | 2592 | __le16 cqe_pause_thr_low; |
2273 | __le16 status_block_index; | 2593 | __le16 cqe_pause_thr_high; |
2274 | u8 func; | 2594 | __le16 bd_pause_thr_low; |
2275 | u8 status_block_id; | 2595 | __le16 bd_pause_thr_high; |
2276 | __le32 __flags; | 2596 | __le16 sge_pause_thr_low; |
2597 | __le16 sge_pause_thr_high; | ||
2598 | __le16 rx_cos_mask; | ||
2599 | u8 safc_group_num; | ||
2600 | u8 safc_group_en_flg; | ||
2601 | u8 traffic_type; | ||
2602 | u8 reserved0; | ||
2603 | __le16 reserved1; | ||
2604 | __le32 reserved2; | ||
2277 | }; | 2605 | }; |
2278 | 2606 | ||
2279 | /* | ||
2280 | * tstorm status block | ||
2281 | */ | ||
2282 | struct tstorm_def_status_block { | ||
2283 | __le16 index_values[HC_TSTORM_DEF_SB_NUM_INDICES]; | ||
2284 | __le16 status_block_index; | ||
2285 | u8 func; | ||
2286 | u8 status_block_id; | ||
2287 | __le32 __flags; | ||
2288 | }; | ||
2289 | 2607 | ||
2290 | /* | 2608 | /* |
2291 | * host status block | 2609 | * client init ramrod data |
2292 | */ | 2610 | */ |
2293 | struct host_def_status_block { | 2611 | struct client_init_general_data { |
2294 | struct atten_def_status_block atten_status_block; | 2612 | u8 client_id; |
2295 | struct cstorm_def_status_block_u u_def_status_block; | 2613 | u8 statistics_counter_id; |
2296 | struct cstorm_def_status_block_c c_def_status_block; | 2614 | u8 statistics_en_flg; |
2297 | struct xstorm_def_status_block x_def_status_block; | 2615 | u8 is_fcoe_flg; |
2298 | struct tstorm_def_status_block t_def_status_block; | 2616 | u8 activate_flg; |
2617 | u8 sp_client_id; | ||
2618 | __le16 reserved0; | ||
2619 | __le32 reserved1[2]; | ||
2299 | }; | 2620 | }; |
2300 | 2621 | ||
2301 | 2622 | ||
2302 | /* | 2623 | /* |
2303 | * cstorm status block, generated by ustorm | 2624 | * client init rx data |
2304 | */ | 2625 | */ |
2305 | struct cstorm_status_block_u { | 2626 | struct client_init_rx_data { |
2306 | __le16 index_values[HC_USTORM_SB_NUM_INDICES]; | 2627 | u8 tpa_en_flg; |
2307 | __le16 status_block_index; | 2628 | u8 vmqueue_mode_en_flg; |
2308 | u8 func; | 2629 | u8 extra_data_over_sgl_en_flg; |
2630 | u8 cache_line_alignment_log_size; | ||
2631 | u8 enable_dynamic_hc; | ||
2632 | u8 max_sges_for_packet; | ||
2633 | u8 client_qzone_id; | ||
2634 | u8 drop_ip_cs_err_flg; | ||
2635 | u8 drop_tcp_cs_err_flg; | ||
2636 | u8 drop_ttl0_flg; | ||
2637 | u8 drop_udp_cs_err_flg; | ||
2638 | u8 inner_vlan_removal_enable_flg; | ||
2639 | u8 outer_vlan_removal_enable_flg; | ||
2309 | u8 status_block_id; | 2640 | u8 status_block_id; |
2310 | __le32 __flags; | 2641 | u8 rx_sb_index_number; |
2642 | u8 reserved0[3]; | ||
2643 | __le16 bd_buff_size; | ||
2644 | __le16 sge_buff_size; | ||
2645 | __le16 mtu; | ||
2646 | struct regpair bd_page_base; | ||
2647 | struct regpair sge_page_base; | ||
2648 | struct regpair cqe_page_base; | ||
2649 | u8 is_leading_rss; | ||
2650 | u8 is_approx_mcast; | ||
2651 | __le16 max_agg_size; | ||
2652 | __le32 reserved2[3]; | ||
2653 | }; | ||
2654 | |||
2655 | /* | ||
2656 | * client init tx data | ||
2657 | */ | ||
2658 | struct client_init_tx_data { | ||
2659 | u8 enforce_security_flg; | ||
2660 | u8 tx_status_block_id; | ||
2661 | u8 tx_sb_index_number; | ||
2662 | u8 reserved0; | ||
2663 | __le16 mtu; | ||
2664 | __le16 reserved1; | ||
2665 | struct regpair tx_bd_page_base; | ||
2666 | __le32 reserved2[2]; | ||
2311 | }; | 2667 | }; |
2312 | 2668 | ||
2313 | /* | 2669 | /* |
2314 | * cstorm status block, generated by cstorm | 2670 | * client init ramrod data |
2315 | */ | 2671 | */ |
2316 | struct cstorm_status_block_c { | 2672 | struct client_init_ramrod_data { |
2317 | __le16 index_values[HC_CSTORM_SB_NUM_INDICES]; | 2673 | struct client_init_general_data general; |
2318 | __le16 status_block_index; | 2674 | struct client_init_rx_data rx; |
2319 | u8 func; | 2675 | struct client_init_tx_data tx; |
2320 | u8 status_block_id; | 2676 | struct client_init_fc_data fc; |
2321 | __le32 __flags; | ||
2322 | }; | 2677 | }; |
2323 | 2678 | ||
2679 | |||
2324 | /* | 2680 | /* |
2325 | * host status block | 2681 | * The data contain client ID need to the ramrod |
2326 | */ | 2682 | */ |
2327 | struct host_status_block { | 2683 | struct eth_common_ramrod_data { |
2328 | struct cstorm_status_block_u u_status_block; | 2684 | u32 client_id; |
2329 | struct cstorm_status_block_c c_status_block; | 2685 | u32 reserved1; |
2330 | }; | 2686 | }; |
2331 | 2687 | ||
2332 | 2688 | ||
2333 | /* | 2689 | /* |
2334 | * The data for RSS setup ramrod | 2690 | * union for sgl and raw data. |
2335 | */ | 2691 | */ |
2336 | struct eth_client_setup_ramrod_data { | 2692 | union eth_sgl_or_raw_data { |
2337 | u32 client_id; | 2693 | __le16 sgl[8]; |
2338 | u8 is_rdma; | 2694 | u32 raw_data[4]; |
2339 | u8 is_fcoe; | ||
2340 | u16 reserved1; | ||
2341 | }; | 2695 | }; |
2342 | 2696 | ||
2343 | |||
2344 | /* | 2697 | /* |
2345 | * regular eth FP CQE parameters struct | 2698 | * regular eth FP CQE parameters struct |
2346 | */ | 2699 | */ |
@@ -2358,8 +2711,8 @@ struct eth_fast_path_rx_cqe { | |||
2358 | #define ETH_FAST_PATH_RX_CQE_START_FLG_SHIFT 4 | 2711 | #define ETH_FAST_PATH_RX_CQE_START_FLG_SHIFT 4 |
2359 | #define ETH_FAST_PATH_RX_CQE_END_FLG (0x1<<5) | 2712 | #define ETH_FAST_PATH_RX_CQE_END_FLG (0x1<<5) |
2360 | #define ETH_FAST_PATH_RX_CQE_END_FLG_SHIFT 5 | 2713 | #define ETH_FAST_PATH_RX_CQE_END_FLG_SHIFT 5 |
2361 | #define ETH_FAST_PATH_RX_CQE_RESERVED0 (0x3<<6) | 2714 | #define ETH_FAST_PATH_RX_CQE_SGL_RAW_SEL (0x3<<6) |
2362 | #define ETH_FAST_PATH_RX_CQE_RESERVED0_SHIFT 6 | 2715 | #define ETH_FAST_PATH_RX_CQE_SGL_RAW_SEL_SHIFT 6 |
2363 | u8 status_flags; | 2716 | u8 status_flags; |
2364 | #define ETH_FAST_PATH_RX_CQE_RSS_HASH_TYPE (0x7<<0) | 2717 | #define ETH_FAST_PATH_RX_CQE_RSS_HASH_TYPE (0x7<<0) |
2365 | #define ETH_FAST_PATH_RX_CQE_RSS_HASH_TYPE_SHIFT 0 | 2718 | #define ETH_FAST_PATH_RX_CQE_RSS_HASH_TYPE_SHIFT 0 |
@@ -2380,7 +2733,7 @@ struct eth_fast_path_rx_cqe { | |||
2380 | __le16 pkt_len; | 2733 | __le16 pkt_len; |
2381 | __le16 len_on_bd; | 2734 | __le16 len_on_bd; |
2382 | struct parsing_flags pars_flags; | 2735 | struct parsing_flags pars_flags; |
2383 | __le16 sgl[8]; | 2736 | union eth_sgl_or_raw_data sgl_or_raw_data; |
2384 | }; | 2737 | }; |
2385 | 2738 | ||
2386 | 2739 | ||
@@ -2392,11 +2745,10 @@ struct eth_halt_ramrod_data { | |||
2392 | u32 reserved0; | 2745 | u32 reserved0; |
2393 | }; | 2746 | }; |
2394 | 2747 | ||
2395 | |||
2396 | /* | 2748 | /* |
2397 | * The data for statistics query ramrod | 2749 | * The data for statistics query ramrod |
2398 | */ | 2750 | */ |
2399 | struct eth_query_ramrod_data { | 2751 | struct common_query_ramrod_data { |
2400 | #if defined(__BIG_ENDIAN) | 2752 | #if defined(__BIG_ENDIAN) |
2401 | u8 reserved0; | 2753 | u8 reserved0; |
2402 | u8 collect_port; | 2754 | u8 collect_port; |
@@ -2479,9 +2831,9 @@ struct spe_hdr { | |||
2479 | __le16 type; | 2831 | __le16 type; |
2480 | #define SPE_HDR_CONN_TYPE (0xFF<<0) | 2832 | #define SPE_HDR_CONN_TYPE (0xFF<<0) |
2481 | #define SPE_HDR_CONN_TYPE_SHIFT 0 | 2833 | #define SPE_HDR_CONN_TYPE_SHIFT 0 |
2482 | #define SPE_HDR_COMMON_RAMROD (0xFF<<8) | 2834 | #define SPE_HDR_FUNCTION_ID (0xFF<<8) |
2483 | #define SPE_HDR_COMMON_RAMROD_SHIFT 8 | 2835 | #define SPE_HDR_FUNCTION_ID_SHIFT 8 |
2484 | __le16 reserved; | 2836 | __le16 reserved1; |
2485 | }; | 2837 | }; |
2486 | 2838 | ||
2487 | /* | 2839 | /* |
@@ -2489,12 +2841,10 @@ struct spe_hdr { | |||
2489 | */ | 2841 | */ |
2490 | union eth_specific_data { | 2842 | union eth_specific_data { |
2491 | u8 protocol_data[8]; | 2843 | u8 protocol_data[8]; |
2492 | struct regpair mac_config_addr; | 2844 | struct regpair client_init_ramrod_init_data; |
2493 | struct eth_client_setup_ramrod_data client_setup_ramrod_data; | ||
2494 | struct eth_halt_ramrod_data halt_ramrod_data; | 2845 | struct eth_halt_ramrod_data halt_ramrod_data; |
2495 | struct regpair leading_cqe_addr; | ||
2496 | struct regpair update_data_addr; | 2846 | struct regpair update_data_addr; |
2497 | struct eth_query_ramrod_data query_ramrod_data; | 2847 | struct eth_common_ramrod_data common_ramrod_data; |
2498 | }; | 2848 | }; |
2499 | 2849 | ||
2500 | /* | 2850 | /* |
@@ -2519,7 +2869,7 @@ struct eth_tx_bds_array { | |||
2519 | */ | 2869 | */ |
2520 | struct tstorm_eth_function_common_config { | 2870 | struct tstorm_eth_function_common_config { |
2521 | #if defined(__BIG_ENDIAN) | 2871 | #if defined(__BIG_ENDIAN) |
2522 | u8 leading_client_id; | 2872 | u8 reserved1; |
2523 | u8 rss_result_mask; | 2873 | u8 rss_result_mask; |
2524 | u16 config_flags; | 2874 | u16 config_flags; |
2525 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV4_CAPABILITY (0x1<<0) | 2875 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV4_CAPABILITY (0x1<<0) |
@@ -2532,16 +2882,12 @@ struct tstorm_eth_function_common_config { | |||
2532 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_TCP_CAPABILITY_SHIFT 3 | 2882 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_TCP_CAPABILITY_SHIFT 3 |
2533 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE (0x7<<4) | 2883 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE (0x7<<4) |
2534 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE_SHIFT 4 | 2884 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE_SHIFT 4 |
2535 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_DEFAULT_ENABLE (0x1<<7) | 2885 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_ENABLE_TPA (0x1<<7) |
2536 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_DEFAULT_ENABLE_SHIFT 7 | 2886 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_ENABLE_TPA_SHIFT 7 |
2537 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_VLAN_IN_CAM (0x1<<8) | 2887 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_VLAN_FILTERING_ENABLE (0x1<<8) |
2538 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_VLAN_IN_CAM_SHIFT 8 | 2888 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_VLAN_FILTERING_ENABLE_SHIFT 8 |
2539 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_E1HOV_IN_CAM (0x1<<9) | 2889 | #define __TSTORM_ETH_FUNCTION_COMMON_CONFIG_RESERVED0 (0x7F<<9) |
2540 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_E1HOV_IN_CAM_SHIFT 9 | 2890 | #define __TSTORM_ETH_FUNCTION_COMMON_CONFIG_RESERVED0_SHIFT 9 |
2541 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_ENABLE_TPA (0x1<<10) | ||
2542 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_ENABLE_TPA_SHIFT 10 | ||
2543 | #define __TSTORM_ETH_FUNCTION_COMMON_CONFIG_RESERVED0 (0x1F<<11) | ||
2544 | #define __TSTORM_ETH_FUNCTION_COMMON_CONFIG_RESERVED0_SHIFT 11 | ||
2545 | #elif defined(__LITTLE_ENDIAN) | 2891 | #elif defined(__LITTLE_ENDIAN) |
2546 | u16 config_flags; | 2892 | u16 config_flags; |
2547 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV4_CAPABILITY (0x1<<0) | 2893 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV4_CAPABILITY (0x1<<0) |
@@ -2554,18 +2900,14 @@ struct tstorm_eth_function_common_config { | |||
2554 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_TCP_CAPABILITY_SHIFT 3 | 2900 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_TCP_CAPABILITY_SHIFT 3 |
2555 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE (0x7<<4) | 2901 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE (0x7<<4) |
2556 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE_SHIFT 4 | 2902 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE_SHIFT 4 |
2557 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_DEFAULT_ENABLE (0x1<<7) | 2903 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_ENABLE_TPA (0x1<<7) |
2558 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_DEFAULT_ENABLE_SHIFT 7 | 2904 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_ENABLE_TPA_SHIFT 7 |
2559 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_VLAN_IN_CAM (0x1<<8) | 2905 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_VLAN_FILTERING_ENABLE (0x1<<8) |
2560 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_VLAN_IN_CAM_SHIFT 8 | 2906 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_VLAN_FILTERING_ENABLE_SHIFT 8 |
2561 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_E1HOV_IN_CAM (0x1<<9) | 2907 | #define __TSTORM_ETH_FUNCTION_COMMON_CONFIG_RESERVED0 (0x7F<<9) |
2562 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_E1HOV_IN_CAM_SHIFT 9 | 2908 | #define __TSTORM_ETH_FUNCTION_COMMON_CONFIG_RESERVED0_SHIFT 9 |
2563 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_ENABLE_TPA (0x1<<10) | ||
2564 | #define TSTORM_ETH_FUNCTION_COMMON_CONFIG_ENABLE_TPA_SHIFT 10 | ||
2565 | #define __TSTORM_ETH_FUNCTION_COMMON_CONFIG_RESERVED0 (0x1F<<11) | ||
2566 | #define __TSTORM_ETH_FUNCTION_COMMON_CONFIG_RESERVED0_SHIFT 11 | ||
2567 | u8 rss_result_mask; | 2909 | u8 rss_result_mask; |
2568 | u8 leading_client_id; | 2910 | u8 reserved1; |
2569 | #endif | 2911 | #endif |
2570 | u16 vlan_id[2]; | 2912 | u16 vlan_id[2]; |
2571 | }; | 2913 | }; |
@@ -2613,90 +2955,42 @@ struct mac_configuration_hdr { | |||
2613 | u8 length; | 2955 | u8 length; |
2614 | u8 offset; | 2956 | u8 offset; |
2615 | u16 client_id; | 2957 | u16 client_id; |
2616 | u32 reserved1; | 2958 | u16 echo; |
2617 | }; | 2959 | u16 reserved1; |
2618 | |||
2619 | /* | ||
2620 | * MAC address in list for ramrod | ||
2621 | */ | ||
2622 | struct tstorm_cam_entry { | ||
2623 | __le16 lsb_mac_addr; | ||
2624 | __le16 middle_mac_addr; | ||
2625 | __le16 msb_mac_addr; | ||
2626 | __le16 flags; | ||
2627 | #define TSTORM_CAM_ENTRY_PORT_ID (0x1<<0) | ||
2628 | #define TSTORM_CAM_ENTRY_PORT_ID_SHIFT 0 | ||
2629 | #define TSTORM_CAM_ENTRY_RSRVVAL0 (0x7<<1) | ||
2630 | #define TSTORM_CAM_ENTRY_RSRVVAL0_SHIFT 1 | ||
2631 | #define TSTORM_CAM_ENTRY_RESERVED0 (0xFFF<<4) | ||
2632 | #define TSTORM_CAM_ENTRY_RESERVED0_SHIFT 4 | ||
2633 | }; | ||
2634 | |||
2635 | /* | ||
2636 | * MAC filtering: CAM target table entry | ||
2637 | */ | ||
2638 | struct tstorm_cam_target_table_entry { | ||
2639 | u8 flags; | ||
2640 | #define TSTORM_CAM_TARGET_TABLE_ENTRY_BROADCAST (0x1<<0) | ||
2641 | #define TSTORM_CAM_TARGET_TABLE_ENTRY_BROADCAST_SHIFT 0 | ||
2642 | #define TSTORM_CAM_TARGET_TABLE_ENTRY_OVERRIDE_VLAN_REMOVAL (0x1<<1) | ||
2643 | #define TSTORM_CAM_TARGET_TABLE_ENTRY_OVERRIDE_VLAN_REMOVAL_SHIFT 1 | ||
2644 | #define TSTORM_CAM_TARGET_TABLE_ENTRY_ACTION_TYPE (0x1<<2) | ||
2645 | #define TSTORM_CAM_TARGET_TABLE_ENTRY_ACTION_TYPE_SHIFT 2 | ||
2646 | #define TSTORM_CAM_TARGET_TABLE_ENTRY_RDMA_MAC (0x1<<3) | ||
2647 | #define TSTORM_CAM_TARGET_TABLE_ENTRY_RDMA_MAC_SHIFT 3 | ||
2648 | #define TSTORM_CAM_TARGET_TABLE_ENTRY_RESERVED0 (0xF<<4) | ||
2649 | #define TSTORM_CAM_TARGET_TABLE_ENTRY_RESERVED0_SHIFT 4 | ||
2650 | u8 reserved1; | ||
2651 | u16 vlan_id; | ||
2652 | u32 clients_bit_vector; | ||
2653 | }; | 2960 | }; |
2654 | 2961 | ||
2655 | /* | 2962 | /* |
2656 | * MAC address in list for ramrod | 2963 | * MAC address in list for ramrod |
2657 | */ | 2964 | */ |
2658 | struct mac_configuration_entry { | 2965 | struct mac_configuration_entry { |
2659 | struct tstorm_cam_entry cam_entry; | ||
2660 | struct tstorm_cam_target_table_entry target_table_entry; | ||
2661 | }; | ||
2662 | |||
2663 | /* | ||
2664 | * MAC filtering configuration command | ||
2665 | */ | ||
2666 | struct mac_configuration_cmd { | ||
2667 | struct mac_configuration_hdr hdr; | ||
2668 | struct mac_configuration_entry config_table[64]; | ||
2669 | }; | ||
2670 | |||
2671 | |||
2672 | /* | ||
2673 | * MAC address in list for ramrod | ||
2674 | */ | ||
2675 | struct mac_configuration_entry_e1h { | ||
2676 | __le16 lsb_mac_addr; | 2966 | __le16 lsb_mac_addr; |
2677 | __le16 middle_mac_addr; | 2967 | __le16 middle_mac_addr; |
2678 | __le16 msb_mac_addr; | 2968 | __le16 msb_mac_addr; |
2679 | __le16 vlan_id; | 2969 | __le16 vlan_id; |
2680 | __le16 e1hov_id; | 2970 | u8 pf_id; |
2681 | u8 reserved0; | ||
2682 | u8 flags; | 2971 | u8 flags; |
2683 | #define MAC_CONFIGURATION_ENTRY_E1H_PORT (0x1<<0) | 2972 | #define MAC_CONFIGURATION_ENTRY_ACTION_TYPE (0x1<<0) |
2684 | #define MAC_CONFIGURATION_ENTRY_E1H_PORT_SHIFT 0 | 2973 | #define MAC_CONFIGURATION_ENTRY_ACTION_TYPE_SHIFT 0 |
2685 | #define MAC_CONFIGURATION_ENTRY_E1H_ACTION_TYPE (0x1<<1) | 2974 | #define MAC_CONFIGURATION_ENTRY_RDMA_MAC (0x1<<1) |
2686 | #define MAC_CONFIGURATION_ENTRY_E1H_ACTION_TYPE_SHIFT 1 | 2975 | #define MAC_CONFIGURATION_ENTRY_RDMA_MAC_SHIFT 1 |
2687 | #define MAC_CONFIGURATION_ENTRY_E1H_RDMA_MAC (0x1<<2) | 2976 | #define MAC_CONFIGURATION_ENTRY_VLAN_FILTERING_MODE (0x3<<2) |
2688 | #define MAC_CONFIGURATION_ENTRY_E1H_RDMA_MAC_SHIFT 2 | 2977 | #define MAC_CONFIGURATION_ENTRY_VLAN_FILTERING_MODE_SHIFT 2 |
2689 | #define MAC_CONFIGURATION_ENTRY_E1H_RESERVED1 (0x1F<<3) | 2978 | #define MAC_CONFIGURATION_ENTRY_OVERRIDE_VLAN_REMOVAL (0x1<<4) |
2690 | #define MAC_CONFIGURATION_ENTRY_E1H_RESERVED1_SHIFT 3 | 2979 | #define MAC_CONFIGURATION_ENTRY_OVERRIDE_VLAN_REMOVAL_SHIFT 4 |
2980 | #define MAC_CONFIGURATION_ENTRY_BROADCAST (0x1<<5) | ||
2981 | #define MAC_CONFIGURATION_ENTRY_BROADCAST_SHIFT 5 | ||
2982 | #define MAC_CONFIGURATION_ENTRY_RESERVED1 (0x3<<6) | ||
2983 | #define MAC_CONFIGURATION_ENTRY_RESERVED1_SHIFT 6 | ||
2984 | u16 reserved0; | ||
2691 | u32 clients_bit_vector; | 2985 | u32 clients_bit_vector; |
2692 | }; | 2986 | }; |
2693 | 2987 | ||
2694 | /* | 2988 | /* |
2695 | * MAC filtering configuration command | 2989 | * MAC filtering configuration command |
2696 | */ | 2990 | */ |
2697 | struct mac_configuration_cmd_e1h { | 2991 | struct mac_configuration_cmd { |
2698 | struct mac_configuration_hdr hdr; | 2992 | struct mac_configuration_hdr hdr; |
2699 | struct mac_configuration_entry_e1h config_table[32]; | 2993 | struct mac_configuration_entry config_table[64]; |
2700 | }; | 2994 | }; |
2701 | 2995 | ||
2702 | 2996 | ||
@@ -2709,65 +3003,6 @@ struct tstorm_eth_approximate_match_multicast_filtering { | |||
2709 | 3003 | ||
2710 | 3004 | ||
2711 | /* | 3005 | /* |
2712 | * Configuration parameters per client in Tstorm | ||
2713 | */ | ||
2714 | struct tstorm_eth_client_config { | ||
2715 | #if defined(__BIG_ENDIAN) | ||
2716 | u8 reserved0; | ||
2717 | u8 statistics_counter_id; | ||
2718 | u16 mtu; | ||
2719 | #elif defined(__LITTLE_ENDIAN) | ||
2720 | u16 mtu; | ||
2721 | u8 statistics_counter_id; | ||
2722 | u8 reserved0; | ||
2723 | #endif | ||
2724 | #if defined(__BIG_ENDIAN) | ||
2725 | u16 drop_flags; | ||
2726 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_IP_CS_ERR (0x1<<0) | ||
2727 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_IP_CS_ERR_SHIFT 0 | ||
2728 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_TCP_CS_ERR (0x1<<1) | ||
2729 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_TCP_CS_ERR_SHIFT 1 | ||
2730 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_TTL0 (0x1<<2) | ||
2731 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_TTL0_SHIFT 2 | ||
2732 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_UDP_CS_ERR (0x1<<3) | ||
2733 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_UDP_CS_ERR_SHIFT 3 | ||
2734 | #define __TSTORM_ETH_CLIENT_CONFIG_RESERVED2 (0xFFF<<4) | ||
2735 | #define __TSTORM_ETH_CLIENT_CONFIG_RESERVED2_SHIFT 4 | ||
2736 | u16 config_flags; | ||
2737 | #define TSTORM_ETH_CLIENT_CONFIG_VLAN_REM_ENABLE (0x1<<0) | ||
2738 | #define TSTORM_ETH_CLIENT_CONFIG_VLAN_REM_ENABLE_SHIFT 0 | ||
2739 | #define TSTORM_ETH_CLIENT_CONFIG_E1HOV_REM_ENABLE (0x1<<1) | ||
2740 | #define TSTORM_ETH_CLIENT_CONFIG_E1HOV_REM_ENABLE_SHIFT 1 | ||
2741 | #define TSTORM_ETH_CLIENT_CONFIG_STATSITICS_ENABLE (0x1<<2) | ||
2742 | #define TSTORM_ETH_CLIENT_CONFIG_STATSITICS_ENABLE_SHIFT 2 | ||
2743 | #define __TSTORM_ETH_CLIENT_CONFIG_RESERVED1 (0x1FFF<<3) | ||
2744 | #define __TSTORM_ETH_CLIENT_CONFIG_RESERVED1_SHIFT 3 | ||
2745 | #elif defined(__LITTLE_ENDIAN) | ||
2746 | u16 config_flags; | ||
2747 | #define TSTORM_ETH_CLIENT_CONFIG_VLAN_REM_ENABLE (0x1<<0) | ||
2748 | #define TSTORM_ETH_CLIENT_CONFIG_VLAN_REM_ENABLE_SHIFT 0 | ||
2749 | #define TSTORM_ETH_CLIENT_CONFIG_E1HOV_REM_ENABLE (0x1<<1) | ||
2750 | #define TSTORM_ETH_CLIENT_CONFIG_E1HOV_REM_ENABLE_SHIFT 1 | ||
2751 | #define TSTORM_ETH_CLIENT_CONFIG_STATSITICS_ENABLE (0x1<<2) | ||
2752 | #define TSTORM_ETH_CLIENT_CONFIG_STATSITICS_ENABLE_SHIFT 2 | ||
2753 | #define __TSTORM_ETH_CLIENT_CONFIG_RESERVED1 (0x1FFF<<3) | ||
2754 | #define __TSTORM_ETH_CLIENT_CONFIG_RESERVED1_SHIFT 3 | ||
2755 | u16 drop_flags; | ||
2756 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_IP_CS_ERR (0x1<<0) | ||
2757 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_IP_CS_ERR_SHIFT 0 | ||
2758 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_TCP_CS_ERR (0x1<<1) | ||
2759 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_TCP_CS_ERR_SHIFT 1 | ||
2760 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_TTL0 (0x1<<2) | ||
2761 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_TTL0_SHIFT 2 | ||
2762 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_UDP_CS_ERR (0x1<<3) | ||
2763 | #define TSTORM_ETH_CLIENT_CONFIG_DROP_UDP_CS_ERR_SHIFT 3 | ||
2764 | #define __TSTORM_ETH_CLIENT_CONFIG_RESERVED2 (0xFFF<<4) | ||
2765 | #define __TSTORM_ETH_CLIENT_CONFIG_RESERVED2_SHIFT 4 | ||
2766 | #endif | ||
2767 | }; | ||
2768 | |||
2769 | |||
2770 | /* | ||
2771 | * MAC filtering configuration parameters per port in Tstorm | 3006 | * MAC filtering configuration parameters per port in Tstorm |
2772 | */ | 3007 | */ |
2773 | struct tstorm_eth_mac_filter_config { | 3008 | struct tstorm_eth_mac_filter_config { |
@@ -2777,14 +3012,14 @@ struct tstorm_eth_mac_filter_config { | |||
2777 | u32 mcast_accept_all; | 3012 | u32 mcast_accept_all; |
2778 | u32 bcast_drop_all; | 3013 | u32 bcast_drop_all; |
2779 | u32 bcast_accept_all; | 3014 | u32 bcast_accept_all; |
2780 | u32 strict_vlan; | ||
2781 | u32 vlan_filter[2]; | 3015 | u32 vlan_filter[2]; |
3016 | u32 unmatched_unicast; | ||
2782 | u32 reserved; | 3017 | u32 reserved; |
2783 | }; | 3018 | }; |
2784 | 3019 | ||
2785 | 3020 | ||
2786 | /* | 3021 | /* |
2787 | * common flag to indicate existance of TPA. | 3022 | * common flag to indicate existence of TPA. |
2788 | */ | 3023 | */ |
2789 | struct tstorm_eth_tpa_exist { | 3024 | struct tstorm_eth_tpa_exist { |
2790 | #if defined(__BIG_ENDIAN) | 3025 | #if defined(__BIG_ENDIAN) |
@@ -2801,41 +3036,6 @@ struct tstorm_eth_tpa_exist { | |||
2801 | 3036 | ||
2802 | 3037 | ||
2803 | /* | 3038 | /* |
2804 | * rx rings pause data for E1h only | ||
2805 | */ | ||
2806 | struct ustorm_eth_rx_pause_data_e1h { | ||
2807 | #if defined(__BIG_ENDIAN) | ||
2808 | u16 bd_thr_low; | ||
2809 | u16 cqe_thr_low; | ||
2810 | #elif defined(__LITTLE_ENDIAN) | ||
2811 | u16 cqe_thr_low; | ||
2812 | u16 bd_thr_low; | ||
2813 | #endif | ||
2814 | #if defined(__BIG_ENDIAN) | ||
2815 | u16 cos; | ||
2816 | u16 sge_thr_low; | ||
2817 | #elif defined(__LITTLE_ENDIAN) | ||
2818 | u16 sge_thr_low; | ||
2819 | u16 cos; | ||
2820 | #endif | ||
2821 | #if defined(__BIG_ENDIAN) | ||
2822 | u16 bd_thr_high; | ||
2823 | u16 cqe_thr_high; | ||
2824 | #elif defined(__LITTLE_ENDIAN) | ||
2825 | u16 cqe_thr_high; | ||
2826 | u16 bd_thr_high; | ||
2827 | #endif | ||
2828 | #if defined(__BIG_ENDIAN) | ||
2829 | u16 reserved0; | ||
2830 | u16 sge_thr_high; | ||
2831 | #elif defined(__LITTLE_ENDIAN) | ||
2832 | u16 sge_thr_high; | ||
2833 | u16 reserved0; | ||
2834 | #endif | ||
2835 | }; | ||
2836 | |||
2837 | |||
2838 | /* | ||
2839 | * Three RX producers for ETH | 3039 | * Three RX producers for ETH |
2840 | */ | 3040 | */ |
2841 | struct ustorm_eth_rx_producers { | 3041 | struct ustorm_eth_rx_producers { |
@@ -2857,6 +3057,18 @@ struct ustorm_eth_rx_producers { | |||
2857 | 3057 | ||
2858 | 3058 | ||
2859 | /* | 3059 | /* |
3060 | * cfc delete event data | ||
3061 | */ | ||
3062 | struct cfc_del_event_data { | ||
3063 | u32 cid; | ||
3064 | u8 error; | ||
3065 | u8 reserved0; | ||
3066 | u16 reserved1; | ||
3067 | u32 reserved2; | ||
3068 | }; | ||
3069 | |||
3070 | |||
3071 | /* | ||
2860 | * per-port SAFC demo variables | 3072 | * per-port SAFC demo variables |
2861 | */ | 3073 | */ |
2862 | struct cmng_flags_per_port { | 3074 | struct cmng_flags_per_port { |
@@ -2872,8 +3084,10 @@ struct cmng_flags_per_port { | |||
2872 | #define CMNG_FLAGS_PER_PORT_RATE_SHAPING_PROTOCOL_SHIFT 3 | 3084 | #define CMNG_FLAGS_PER_PORT_RATE_SHAPING_PROTOCOL_SHIFT 3 |
2873 | #define CMNG_FLAGS_PER_PORT_FAIRNESS_COS (0x1<<4) | 3085 | #define CMNG_FLAGS_PER_PORT_FAIRNESS_COS (0x1<<4) |
2874 | #define CMNG_FLAGS_PER_PORT_FAIRNESS_COS_SHIFT 4 | 3086 | #define CMNG_FLAGS_PER_PORT_FAIRNESS_COS_SHIFT 4 |
2875 | #define __CMNG_FLAGS_PER_PORT_RESERVED0 (0x7FFFFFF<<5) | 3087 | #define CMNG_FLAGS_PER_PORT_FAIRNESS_COS_MODE (0x1<<5) |
2876 | #define __CMNG_FLAGS_PER_PORT_RESERVED0_SHIFT 5 | 3088 | #define CMNG_FLAGS_PER_PORT_FAIRNESS_COS_MODE_SHIFT 5 |
3089 | #define __CMNG_FLAGS_PER_PORT_RESERVED0 (0x3FFFFFF<<6) | ||
3090 | #define __CMNG_FLAGS_PER_PORT_RESERVED0_SHIFT 6 | ||
2877 | }; | 3091 | }; |
2878 | 3092 | ||
2879 | 3093 | ||
@@ -2907,30 +3121,92 @@ struct safc_struct_per_port { | |||
2907 | u8 __reserved0; | 3121 | u8 __reserved0; |
2908 | u16 __reserved1; | 3122 | u16 __reserved1; |
2909 | #endif | 3123 | #endif |
3124 | u8 cos_to_traffic_types[MAX_COS_NUMBER]; | ||
3125 | u32 __reserved2; | ||
2910 | u16 cos_to_pause_mask[NUM_OF_SAFC_BITS]; | 3126 | u16 cos_to_pause_mask[NUM_OF_SAFC_BITS]; |
2911 | }; | 3127 | }; |
2912 | 3128 | ||
2913 | /* | 3129 | /* |
3130 | * per-port PFC variables | ||
3131 | */ | ||
3132 | struct pfc_struct_per_port { | ||
3133 | u8 priority_to_traffic_types[MAX_PFC_PRIORITIES]; | ||
3134 | #if defined(__BIG_ENDIAN) | ||
3135 | u16 pfc_pause_quanta_in_nanosec; | ||
3136 | u8 __reserved0; | ||
3137 | u8 priority_non_pausable_mask; | ||
3138 | #elif defined(__LITTLE_ENDIAN) | ||
3139 | u8 priority_non_pausable_mask; | ||
3140 | u8 __reserved0; | ||
3141 | u16 pfc_pause_quanta_in_nanosec; | ||
3142 | #endif | ||
3143 | }; | ||
3144 | |||
3145 | /* | ||
3146 | * Priority and cos | ||
3147 | */ | ||
3148 | struct priority_cos { | ||
3149 | #if defined(__BIG_ENDIAN) | ||
3150 | u16 reserved1; | ||
3151 | u8 cos; | ||
3152 | u8 priority; | ||
3153 | #elif defined(__LITTLE_ENDIAN) | ||
3154 | u8 priority; | ||
3155 | u8 cos; | ||
3156 | u16 reserved1; | ||
3157 | #endif | ||
3158 | u32 reserved2; | ||
3159 | }; | ||
3160 | |||
3161 | /* | ||
2914 | * Per-port congestion management variables | 3162 | * Per-port congestion management variables |
2915 | */ | 3163 | */ |
2916 | struct cmng_struct_per_port { | 3164 | struct cmng_struct_per_port { |
2917 | struct rate_shaping_vars_per_port rs_vars; | 3165 | struct rate_shaping_vars_per_port rs_vars; |
2918 | struct fairness_vars_per_port fair_vars; | 3166 | struct fairness_vars_per_port fair_vars; |
2919 | struct safc_struct_per_port safc_vars; | 3167 | struct safc_struct_per_port safc_vars; |
3168 | struct pfc_struct_per_port pfc_vars; | ||
3169 | #if defined(__BIG_ENDIAN) | ||
3170 | u16 __reserved1; | ||
3171 | u8 dcb_enabled; | ||
3172 | u8 llfc_mode; | ||
3173 | #elif defined(__LITTLE_ENDIAN) | ||
3174 | u8 llfc_mode; | ||
3175 | u8 dcb_enabled; | ||
3176 | u16 __reserved1; | ||
3177 | #endif | ||
3178 | struct priority_cos | ||
3179 | traffic_type_to_priority_cos[MAX_PFC_TRAFFIC_TYPES]; | ||
2920 | struct cmng_flags_per_port flags; | 3180 | struct cmng_flags_per_port flags; |
2921 | }; | 3181 | }; |
2922 | 3182 | ||
2923 | 3183 | ||
3184 | |||
3185 | /* | ||
3186 | * Dynamic HC counters set by the driver | ||
3187 | */ | ||
3188 | struct hc_dynamic_drv_counter { | ||
3189 | u32 val[HC_SB_MAX_DYNAMIC_INDICES]; | ||
3190 | }; | ||
3191 | |||
3192 | /* | ||
3193 | * zone A per-queue data | ||
3194 | */ | ||
3195 | struct cstorm_queue_zone_data { | ||
3196 | struct hc_dynamic_drv_counter hc_dyn_drv_cnt; | ||
3197 | struct regpair reserved[2]; | ||
3198 | }; | ||
3199 | |||
2924 | /* | 3200 | /* |
2925 | * Dynamic host coalescing init parameters | 3201 | * Dynamic host coalescing init parameters |
2926 | */ | 3202 | */ |
2927 | struct dynamic_hc_config { | 3203 | struct dynamic_hc_config { |
2928 | u32 threshold[3]; | 3204 | u32 threshold[3]; |
2929 | u8 shift_per_protocol[HC_USTORM_SB_NUM_INDICES]; | 3205 | u8 shift_per_protocol[HC_SB_MAX_DYNAMIC_INDICES]; |
2930 | u8 hc_timeout0[HC_USTORM_SB_NUM_INDICES]; | 3206 | u8 hc_timeout0[HC_SB_MAX_DYNAMIC_INDICES]; |
2931 | u8 hc_timeout1[HC_USTORM_SB_NUM_INDICES]; | 3207 | u8 hc_timeout1[HC_SB_MAX_DYNAMIC_INDICES]; |
2932 | u8 hc_timeout2[HC_USTORM_SB_NUM_INDICES]; | 3208 | u8 hc_timeout2[HC_SB_MAX_DYNAMIC_INDICES]; |
2933 | u8 hc_timeout3[HC_USTORM_SB_NUM_INDICES]; | 3209 | u8 hc_timeout3[HC_SB_MAX_DYNAMIC_INDICES]; |
2934 | }; | 3210 | }; |
2935 | 3211 | ||
2936 | 3212 | ||
@@ -2954,7 +3230,7 @@ struct xstorm_per_client_stats { | |||
2954 | * Common statistics collected by the Xstorm (per port) | 3230 | * Common statistics collected by the Xstorm (per port) |
2955 | */ | 3231 | */ |
2956 | struct xstorm_common_stats { | 3232 | struct xstorm_common_stats { |
2957 | struct xstorm_per_client_stats client_statistics[MAX_X_STAT_COUNTER_ID]; | 3233 | struct xstorm_per_client_stats client_statistics[MAX_STAT_COUNTER_ID]; |
2958 | }; | 3234 | }; |
2959 | 3235 | ||
2960 | /* | 3236 | /* |
@@ -2991,7 +3267,7 @@ struct tstorm_per_client_stats { | |||
2991 | */ | 3267 | */ |
2992 | struct tstorm_common_stats { | 3268 | struct tstorm_common_stats { |
2993 | struct tstorm_per_port_stats port_statistics; | 3269 | struct tstorm_per_port_stats port_statistics; |
2994 | struct tstorm_per_client_stats client_statistics[MAX_T_STAT_COUNTER_ID]; | 3270 | struct tstorm_per_client_stats client_statistics[MAX_STAT_COUNTER_ID]; |
2995 | }; | 3271 | }; |
2996 | 3272 | ||
2997 | /* | 3273 | /* |
@@ -3012,7 +3288,7 @@ struct ustorm_per_client_stats { | |||
3012 | * Protocol-common statistics collected by the Ustorm | 3288 | * Protocol-common statistics collected by the Ustorm |
3013 | */ | 3289 | */ |
3014 | struct ustorm_common_stats { | 3290 | struct ustorm_common_stats { |
3015 | struct ustorm_per_client_stats client_statistics[MAX_U_STAT_COUNTER_ID]; | 3291 | struct ustorm_per_client_stats client_statistics[MAX_STAT_COUNTER_ID]; |
3016 | }; | 3292 | }; |
3017 | 3293 | ||
3018 | /* | 3294 | /* |
@@ -3026,6 +3302,70 @@ struct eth_stats_query { | |||
3026 | 3302 | ||
3027 | 3303 | ||
3028 | /* | 3304 | /* |
3305 | * set mac event data | ||
3306 | */ | ||
3307 | struct set_mac_event_data { | ||
3308 | u16 echo; | ||
3309 | u16 reserved0; | ||
3310 | u32 reserved1; | ||
3311 | u32 reserved2; | ||
3312 | }; | ||
3313 | |||
3314 | /* | ||
3315 | * union for all event ring message types | ||
3316 | */ | ||
3317 | union event_data { | ||
3318 | struct set_mac_event_data set_mac_event; | ||
3319 | struct cfc_del_event_data cfc_del_event; | ||
3320 | }; | ||
3321 | |||
3322 | |||
3323 | /* | ||
3324 | * per PF event ring data | ||
3325 | */ | ||
3326 | struct event_ring_data { | ||
3327 | struct regpair base_addr; | ||
3328 | #if defined(__BIG_ENDIAN) | ||
3329 | u8 index_id; | ||
3330 | u8 sb_id; | ||
3331 | u16 producer; | ||
3332 | #elif defined(__LITTLE_ENDIAN) | ||
3333 | u16 producer; | ||
3334 | u8 sb_id; | ||
3335 | u8 index_id; | ||
3336 | #endif | ||
3337 | u32 reserved0; | ||
3338 | }; | ||
3339 | |||
3340 | |||
3341 | /* | ||
3342 | * event ring message element (each element is 128 bits) | ||
3343 | */ | ||
3344 | struct event_ring_msg { | ||
3345 | u8 opcode; | ||
3346 | u8 reserved0; | ||
3347 | u16 reserved1; | ||
3348 | union event_data data; | ||
3349 | }; | ||
3350 | |||
3351 | /* | ||
3352 | * event ring next page element (128 bits) | ||
3353 | */ | ||
3354 | struct event_ring_next { | ||
3355 | struct regpair addr; | ||
3356 | u32 reserved[2]; | ||
3357 | }; | ||
3358 | |||
3359 | /* | ||
3360 | * union for event ring element types (each element is 128 bits) | ||
3361 | */ | ||
3362 | union event_ring_elem { | ||
3363 | struct event_ring_msg message; | ||
3364 | struct event_ring_next next_page; | ||
3365 | }; | ||
3366 | |||
3367 | |||
3368 | /* | ||
3029 | * per-vnic fairness variables | 3369 | * per-vnic fairness variables |
3030 | */ | 3370 | */ |
3031 | struct fairness_vars_per_vn { | 3371 | struct fairness_vars_per_vn { |
@@ -3037,6 +3377,25 @@ struct fairness_vars_per_vn { | |||
3037 | 3377 | ||
3038 | 3378 | ||
3039 | /* | 3379 | /* |
3380 | * The data for flow control configuration | ||
3381 | */ | ||
3382 | struct flow_control_configuration { | ||
3383 | struct priority_cos | ||
3384 | traffic_type_to_priority_cos[MAX_PFC_TRAFFIC_TYPES]; | ||
3385 | #if defined(__BIG_ENDIAN) | ||
3386 | u16 reserved1; | ||
3387 | u8 dcb_version; | ||
3388 | u8 dcb_enabled; | ||
3389 | #elif defined(__LITTLE_ENDIAN) | ||
3390 | u8 dcb_enabled; | ||
3391 | u8 dcb_version; | ||
3392 | u16 reserved1; | ||
3393 | #endif | ||
3394 | u32 reserved2; | ||
3395 | }; | ||
3396 | |||
3397 | |||
3398 | /* | ||
3040 | * FW version stored in the Xstorm RAM | 3399 | * FW version stored in the Xstorm RAM |
3041 | */ | 3400 | */ |
3042 | struct fw_version { | 3401 | struct fw_version { |
@@ -3064,6 +3423,137 @@ struct fw_version { | |||
3064 | 3423 | ||
3065 | 3424 | ||
3066 | /* | 3425 | /* |
3426 | * Dynamic Host-Coalescing - Driver(host) counters | ||
3427 | */ | ||
3428 | struct hc_dynamic_sb_drv_counters { | ||
3429 | u32 dynamic_hc_drv_counter[HC_SB_MAX_DYNAMIC_INDICES]; | ||
3430 | }; | ||
3431 | |||
3432 | |||
3433 | /* | ||
3434 | * 2 bytes. configuration/state parameters for a single protocol index | ||
3435 | */ | ||
3436 | struct hc_index_data { | ||
3437 | #if defined(__BIG_ENDIAN) | ||
3438 | u8 flags; | ||
3439 | #define HC_INDEX_DATA_SM_ID (0x1<<0) | ||
3440 | #define HC_INDEX_DATA_SM_ID_SHIFT 0 | ||
3441 | #define HC_INDEX_DATA_HC_ENABLED (0x1<<1) | ||
3442 | #define HC_INDEX_DATA_HC_ENABLED_SHIFT 1 | ||
3443 | #define HC_INDEX_DATA_DYNAMIC_HC_ENABLED (0x1<<2) | ||
3444 | #define HC_INDEX_DATA_DYNAMIC_HC_ENABLED_SHIFT 2 | ||
3445 | #define HC_INDEX_DATA_RESERVE (0x1F<<3) | ||
3446 | #define HC_INDEX_DATA_RESERVE_SHIFT 3 | ||
3447 | u8 timeout; | ||
3448 | #elif defined(__LITTLE_ENDIAN) | ||
3449 | u8 timeout; | ||
3450 | u8 flags; | ||
3451 | #define HC_INDEX_DATA_SM_ID (0x1<<0) | ||
3452 | #define HC_INDEX_DATA_SM_ID_SHIFT 0 | ||
3453 | #define HC_INDEX_DATA_HC_ENABLED (0x1<<1) | ||
3454 | #define HC_INDEX_DATA_HC_ENABLED_SHIFT 1 | ||
3455 | #define HC_INDEX_DATA_DYNAMIC_HC_ENABLED (0x1<<2) | ||
3456 | #define HC_INDEX_DATA_DYNAMIC_HC_ENABLED_SHIFT 2 | ||
3457 | #define HC_INDEX_DATA_RESERVE (0x1F<<3) | ||
3458 | #define HC_INDEX_DATA_RESERVE_SHIFT 3 | ||
3459 | #endif | ||
3460 | }; | ||
3461 | |||
3462 | |||
3463 | /* | ||
3464 | * HC state-machine | ||
3465 | */ | ||
3466 | struct hc_status_block_sm { | ||
3467 | #if defined(__BIG_ENDIAN) | ||
3468 | u8 igu_seg_id; | ||
3469 | u8 igu_sb_id; | ||
3470 | u8 timer_value; | ||
3471 | u8 __flags; | ||
3472 | #elif defined(__LITTLE_ENDIAN) | ||
3473 | u8 __flags; | ||
3474 | u8 timer_value; | ||
3475 | u8 igu_sb_id; | ||
3476 | u8 igu_seg_id; | ||
3477 | #endif | ||
3478 | u32 time_to_expire; | ||
3479 | }; | ||
3480 | |||
3481 | /* | ||
3482 | * hold PCI identification variables- used in various places in firmware | ||
3483 | */ | ||
3484 | struct pci_entity { | ||
3485 | #if defined(__BIG_ENDIAN) | ||
3486 | u8 vf_valid; | ||
3487 | u8 vf_id; | ||
3488 | u8 vnic_id; | ||
3489 | u8 pf_id; | ||
3490 | #elif defined(__LITTLE_ENDIAN) | ||
3491 | u8 pf_id; | ||
3492 | u8 vnic_id; | ||
3493 | u8 vf_id; | ||
3494 | u8 vf_valid; | ||
3495 | #endif | ||
3496 | }; | ||
3497 | |||
3498 | /* | ||
3499 | * The fast-path status block meta-data, common to all chips | ||
3500 | */ | ||
3501 | struct hc_sb_data { | ||
3502 | struct regpair host_sb_addr; | ||
3503 | struct hc_status_block_sm state_machine[HC_SB_MAX_SM]; | ||
3504 | struct pci_entity p_func; | ||
3505 | #if defined(__BIG_ENDIAN) | ||
3506 | u8 rsrv0; | ||
3507 | u8 dhc_qzone_id; | ||
3508 | u8 __dynamic_hc_level; | ||
3509 | u8 same_igu_sb_1b; | ||
3510 | #elif defined(__LITTLE_ENDIAN) | ||
3511 | u8 same_igu_sb_1b; | ||
3512 | u8 __dynamic_hc_level; | ||
3513 | u8 dhc_qzone_id; | ||
3514 | u8 rsrv0; | ||
3515 | #endif | ||
3516 | struct regpair rsrv1[2]; | ||
3517 | }; | ||
3518 | |||
3519 | |||
3520 | /* | ||
3521 | * The fast-path status block meta-data | ||
3522 | */ | ||
3523 | struct hc_sp_status_block_data { | ||
3524 | struct regpair host_sb_addr; | ||
3525 | #if defined(__BIG_ENDIAN) | ||
3526 | u16 rsrv; | ||
3527 | u8 igu_seg_id; | ||
3528 | u8 igu_sb_id; | ||
3529 | #elif defined(__LITTLE_ENDIAN) | ||
3530 | u8 igu_sb_id; | ||
3531 | u8 igu_seg_id; | ||
3532 | u16 rsrv; | ||
3533 | #endif | ||
3534 | struct pci_entity p_func; | ||
3535 | }; | ||
3536 | |||
3537 | |||
3538 | /* | ||
3539 | * The fast-path status block meta-data | ||
3540 | */ | ||
3541 | struct hc_status_block_data_e1x { | ||
3542 | struct hc_index_data index_data[HC_SB_MAX_INDICES_E1X]; | ||
3543 | struct hc_sb_data common; | ||
3544 | }; | ||
3545 | |||
3546 | |||
3547 | /* | ||
3548 | * The fast-path status block meta-data | ||
3549 | */ | ||
3550 | struct hc_status_block_data_e2 { | ||
3551 | struct hc_index_data index_data[HC_SB_MAX_INDICES_E2]; | ||
3552 | struct hc_sb_data common; | ||
3553 | }; | ||
3554 | |||
3555 | |||
3556 | /* | ||
3067 | * FW version stored in first line of pram | 3557 | * FW version stored in first line of pram |
3068 | */ | 3558 | */ |
3069 | struct pram_fw_version { | 3559 | struct pram_fw_version { |
@@ -3086,11 +3576,21 @@ struct pram_fw_version { | |||
3086 | 3576 | ||
3087 | 3577 | ||
3088 | /* | 3578 | /* |
3579 | * Ethernet slow path element | ||
3580 | */ | ||
3581 | union protocol_common_specific_data { | ||
3582 | u8 protocol_data[8]; | ||
3583 | struct regpair phy_address; | ||
3584 | struct regpair mac_config_addr; | ||
3585 | struct common_query_ramrod_data query_ramrod_data; | ||
3586 | }; | ||
3587 | |||
3588 | /* | ||
3089 | * The send queue element | 3589 | * The send queue element |
3090 | */ | 3590 | */ |
3091 | struct protocol_common_spe { | 3591 | struct protocol_common_spe { |
3092 | struct spe_hdr hdr; | 3592 | struct spe_hdr hdr; |
3093 | struct regpair phy_address; | 3593 | union protocol_common_specific_data data; |
3094 | }; | 3594 | }; |
3095 | 3595 | ||
3096 | 3596 | ||
@@ -3123,7 +3623,7 @@ struct rate_shaping_vars_per_vn { | |||
3123 | */ | 3623 | */ |
3124 | struct slow_path_element { | 3624 | struct slow_path_element { |
3125 | struct spe_hdr hdr; | 3625 | struct spe_hdr hdr; |
3126 | u8 protocol_data[8]; | 3626 | struct regpair protocol_data; |
3127 | }; | 3627 | }; |
3128 | 3628 | ||
3129 | 3629 | ||
@@ -3136,3 +3636,97 @@ struct stats_indication_flags { | |||
3136 | }; | 3636 | }; |
3137 | 3637 | ||
3138 | 3638 | ||
3639 | /* | ||
3640 | * per-port PFC variables | ||
3641 | */ | ||
3642 | struct storm_pfc_struct_per_port { | ||
3643 | #if defined(__BIG_ENDIAN) | ||
3644 | u16 mid_mac_addr; | ||
3645 | u16 msb_mac_addr; | ||
3646 | #elif defined(__LITTLE_ENDIAN) | ||
3647 | u16 msb_mac_addr; | ||
3648 | u16 mid_mac_addr; | ||
3649 | #endif | ||
3650 | #if defined(__BIG_ENDIAN) | ||
3651 | u16 pfc_pause_quanta_in_nanosec; | ||
3652 | u16 lsb_mac_addr; | ||
3653 | #elif defined(__LITTLE_ENDIAN) | ||
3654 | u16 lsb_mac_addr; | ||
3655 | u16 pfc_pause_quanta_in_nanosec; | ||
3656 | #endif | ||
3657 | }; | ||
3658 | |||
3659 | /* | ||
3660 | * Per-port congestion management variables | ||
3661 | */ | ||
3662 | struct storm_cmng_struct_per_port { | ||
3663 | struct storm_pfc_struct_per_port pfc_vars; | ||
3664 | }; | ||
3665 | |||
3666 | |||
3667 | /* | ||
3668 | * zone A per-queue data | ||
3669 | */ | ||
3670 | struct tstorm_queue_zone_data { | ||
3671 | struct regpair reserved[4]; | ||
3672 | }; | ||
3673 | |||
3674 | |||
3675 | /* | ||
3676 | * zone B per-VF data | ||
3677 | */ | ||
3678 | struct tstorm_vf_zone_data { | ||
3679 | struct regpair reserved; | ||
3680 | }; | ||
3681 | |||
3682 | |||
3683 | /* | ||
3684 | * zone A per-queue data | ||
3685 | */ | ||
3686 | struct ustorm_queue_zone_data { | ||
3687 | struct ustorm_eth_rx_producers eth_rx_producers; | ||
3688 | struct regpair reserved[3]; | ||
3689 | }; | ||
3690 | |||
3691 | |||
3692 | /* | ||
3693 | * zone B per-VF data | ||
3694 | */ | ||
3695 | struct ustorm_vf_zone_data { | ||
3696 | struct regpair reserved; | ||
3697 | }; | ||
3698 | |||
3699 | |||
3700 | /* | ||
3701 | * data per VF-PF channel | ||
3702 | */ | ||
3703 | struct vf_pf_channel_data { | ||
3704 | #if defined(__BIG_ENDIAN) | ||
3705 | u16 reserved0; | ||
3706 | u8 valid; | ||
3707 | u8 state; | ||
3708 | #elif defined(__LITTLE_ENDIAN) | ||
3709 | u8 state; | ||
3710 | u8 valid; | ||
3711 | u16 reserved0; | ||
3712 | #endif | ||
3713 | u32 reserved1; | ||
3714 | }; | ||
3715 | |||
3716 | |||
3717 | /* | ||
3718 | * zone A per-queue data | ||
3719 | */ | ||
3720 | struct xstorm_queue_zone_data { | ||
3721 | struct regpair reserved[4]; | ||
3722 | }; | ||
3723 | |||
3724 | |||
3725 | /* | ||
3726 | * zone B per-VF data | ||
3727 | */ | ||
3728 | struct xstorm_vf_zone_data { | ||
3729 | struct regpair reserved; | ||
3730 | }; | ||
3731 | |||
3732 | #endif /* BNX2X_HSI_H */ | ||