bnx2x.h (57b8628bb0ac4e47c806e45c5bbd89282e93869b) | bnx2x.h (a334872224a67b614dc888460377862621f3dac7) |
---|---|
1/* bnx2x.h: Broadcom Everest network driver. 2 * 3 * Copyright (c) 2007-2012 Broadcom Corporation 4 * 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 7 * the Free Software Foundation. 8 * --- 9 unchanged lines hidden (view full) --- 18#include <linux/types.h> 19 20/* compilation time flags */ 21 22/* define this to make the driver freeze on error to allow getting debug info 23 * (you will need to reboot afterwards) */ 24/* #define BNX2X_STOP_ON_ERROR */ 25 | 1/* bnx2x.h: Broadcom Everest network driver. 2 * 3 * Copyright (c) 2007-2012 Broadcom Corporation 4 * 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 7 * the Free Software Foundation. 8 * --- 9 unchanged lines hidden (view full) --- 18#include <linux/types.h> 19 20/* compilation time flags */ 21 22/* define this to make the driver freeze on error to allow getting debug info 23 * (you will need to reboot afterwards) */ 24/* #define BNX2X_STOP_ON_ERROR */ 25 |
26#define DRV_MODULE_VERSION "1.72.10-0" 27#define DRV_MODULE_RELDATE "2012/02/20" | 26#define DRV_MODULE_VERSION "1.72.17-0" 27#define DRV_MODULE_RELDATE "2012/04/02" |
28#define BNX2X_BC_VER 0x040200 29 30#if defined(CONFIG_DCB) 31#define BCM_DCBNL 32#endif | 28#define BNX2X_BC_VER 0x040200 29 30#if defined(CONFIG_DCB) 31#define BCM_DCBNL 32#endif |
33 34 35#include "bnx2x_hsi.h" 36 |
|
33#if defined(CONFIG_CNIC) || defined(CONFIG_CNIC_MODULE) 34#define BCM_CNIC 1 35#include "../cnic_if.h" 36#endif 37 38#ifdef BCM_CNIC 39#define BNX2X_MIN_MSIX_VEC_CNT 3 40#define BNX2X_MSIX_VEC_FP_START 2 --- 769 unchanged lines hidden (view full) --- 810#define CHIP_NUM_57712 0x1662 811#define CHIP_NUM_57712_MF 0x1663 812#define CHIP_NUM_57713 0x1651 813#define CHIP_NUM_57713E 0x1652 814#define CHIP_NUM_57800 0x168a 815#define CHIP_NUM_57800_MF 0x16a5 816#define CHIP_NUM_57810 0x168e 817#define CHIP_NUM_57810_MF 0x16ae | 37#if defined(CONFIG_CNIC) || defined(CONFIG_CNIC_MODULE) 38#define BCM_CNIC 1 39#include "../cnic_if.h" 40#endif 41 42#ifdef BCM_CNIC 43#define BNX2X_MIN_MSIX_VEC_CNT 3 44#define BNX2X_MSIX_VEC_FP_START 2 --- 769 unchanged lines hidden (view full) --- 814#define CHIP_NUM_57712 0x1662 815#define CHIP_NUM_57712_MF 0x1663 816#define CHIP_NUM_57713 0x1651 817#define CHIP_NUM_57713E 0x1652 818#define CHIP_NUM_57800 0x168a 819#define CHIP_NUM_57800_MF 0x16a5 820#define CHIP_NUM_57810 0x168e 821#define CHIP_NUM_57810_MF 0x16ae |
822#define CHIP_NUM_57811 0x163d 823#define CHIP_NUM_57811_MF 0x163e |
|
818#define CHIP_NUM_57840 0x168d 819#define CHIP_NUM_57840_MF 0x16ab 820#define CHIP_IS_E1(bp) (CHIP_NUM(bp) == CHIP_NUM_57710) 821#define CHIP_IS_57711(bp) (CHIP_NUM(bp) == CHIP_NUM_57711) 822#define CHIP_IS_57711E(bp) (CHIP_NUM(bp) == CHIP_NUM_57711E) 823#define CHIP_IS_57712(bp) (CHIP_NUM(bp) == CHIP_NUM_57712) 824#define CHIP_IS_57712_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57712_MF) 825#define CHIP_IS_57800(bp) (CHIP_NUM(bp) == CHIP_NUM_57800) 826#define CHIP_IS_57800_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57800_MF) 827#define CHIP_IS_57810(bp) (CHIP_NUM(bp) == CHIP_NUM_57810) 828#define CHIP_IS_57810_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57810_MF) | 824#define CHIP_NUM_57840 0x168d 825#define CHIP_NUM_57840_MF 0x16ab 826#define CHIP_IS_E1(bp) (CHIP_NUM(bp) == CHIP_NUM_57710) 827#define CHIP_IS_57711(bp) (CHIP_NUM(bp) == CHIP_NUM_57711) 828#define CHIP_IS_57711E(bp) (CHIP_NUM(bp) == CHIP_NUM_57711E) 829#define CHIP_IS_57712(bp) (CHIP_NUM(bp) == CHIP_NUM_57712) 830#define CHIP_IS_57712_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57712_MF) 831#define CHIP_IS_57800(bp) (CHIP_NUM(bp) == CHIP_NUM_57800) 832#define CHIP_IS_57800_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57800_MF) 833#define CHIP_IS_57810(bp) (CHIP_NUM(bp) == CHIP_NUM_57810) 834#define CHIP_IS_57810_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57810_MF) |
835#define CHIP_IS_57811(bp) (CHIP_NUM(bp) == CHIP_NUM_57811) 836#define CHIP_IS_57811_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57811_MF) |
|
829#define CHIP_IS_57840(bp) (CHIP_NUM(bp) == CHIP_NUM_57840) 830#define CHIP_IS_57840_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57840_MF) 831#define CHIP_IS_E1H(bp) (CHIP_IS_57711(bp) || \ 832 CHIP_IS_57711E(bp)) 833#define CHIP_IS_E2(bp) (CHIP_IS_57712(bp) || \ 834 CHIP_IS_57712_MF(bp)) 835#define CHIP_IS_E3(bp) (CHIP_IS_57800(bp) || \ 836 CHIP_IS_57800_MF(bp) || \ 837 CHIP_IS_57810(bp) || \ 838 CHIP_IS_57810_MF(bp) || \ | 837#define CHIP_IS_57840(bp) (CHIP_NUM(bp) == CHIP_NUM_57840) 838#define CHIP_IS_57840_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57840_MF) 839#define CHIP_IS_E1H(bp) (CHIP_IS_57711(bp) || \ 840 CHIP_IS_57711E(bp)) 841#define CHIP_IS_E2(bp) (CHIP_IS_57712(bp) || \ 842 CHIP_IS_57712_MF(bp)) 843#define CHIP_IS_E3(bp) (CHIP_IS_57800(bp) || \ 844 CHIP_IS_57800_MF(bp) || \ 845 CHIP_IS_57810(bp) || \ 846 CHIP_IS_57810_MF(bp) || \ |
847 CHIP_IS_57811(bp) || \ 848 CHIP_IS_57811_MF(bp) || \ |
|
839 CHIP_IS_57840(bp) || \ 840 CHIP_IS_57840_MF(bp)) 841#define CHIP_IS_E1x(bp) (CHIP_IS_E1((bp)) || CHIP_IS_E1H((bp))) 842#define USES_WARPCORE(bp) (CHIP_IS_E3(bp)) 843#define IS_E1H_OFFSET (!CHIP_IS_E1(bp)) 844 845#define CHIP_REV_SHIFT 12 846#define CHIP_REV_MASK (0xF << CHIP_REV_SHIFT) --- 201 unchanged lines hidden (view full) --- 1048 } q_rdata; 1049 1050 union { 1051 struct function_start_data func_start; 1052 /* pfc configuration for DCBX ramrod */ 1053 struct flow_control_configuration pfc_config; 1054 } func_rdata; 1055 | 849 CHIP_IS_57840(bp) || \ 850 CHIP_IS_57840_MF(bp)) 851#define CHIP_IS_E1x(bp) (CHIP_IS_E1((bp)) || CHIP_IS_E1H((bp))) 852#define USES_WARPCORE(bp) (CHIP_IS_E3(bp)) 853#define IS_E1H_OFFSET (!CHIP_IS_E1(bp)) 854 855#define CHIP_REV_SHIFT 12 856#define CHIP_REV_MASK (0xF << CHIP_REV_SHIFT) --- 201 unchanged lines hidden (view full) --- 1058 } q_rdata; 1059 1060 union { 1061 struct function_start_data func_start; 1062 /* pfc configuration for DCBX ramrod */ 1063 struct flow_control_configuration pfc_config; 1064 } func_rdata; 1065 |
1066 /* afex ramrod can not be a part of func_rdata union because these 1067 * events might arrive in parallel to other events from func_rdata. 1068 * Therefore, if they would have been defined in the same union, 1069 * data can get corrupted. 1070 */ 1071 struct afex_vif_list_ramrod_data func_afex_rdata; 1072 |
|
1056 /* used by dmae command executer */ 1057 struct dmae_command dmae[MAX_DMAE_C]; 1058 1059 u32 stats_comp; 1060 union mac_stats mac_stats; 1061 struct nig_stats nig_stats; 1062 struct host_port_stats port_stats; 1063 struct host_func_stats func_stats; --- 100 unchanged lines hidden (view full) --- 1164 struct fcoe_statistics_params fcoe; 1165 struct per_queue_stats queue_stats[1]; 1166}; 1167 1168/* Public slow path states */ 1169enum { 1170 BNX2X_SP_RTNL_SETUP_TC, 1171 BNX2X_SP_RTNL_TX_TIMEOUT, | 1073 /* used by dmae command executer */ 1074 struct dmae_command dmae[MAX_DMAE_C]; 1075 1076 u32 stats_comp; 1077 union mac_stats mac_stats; 1078 struct nig_stats nig_stats; 1079 struct host_port_stats port_stats; 1080 struct host_func_stats func_stats; --- 100 unchanged lines hidden (view full) --- 1181 struct fcoe_statistics_params fcoe; 1182 struct per_queue_stats queue_stats[1]; 1183}; 1184 1185/* Public slow path states */ 1186enum { 1187 BNX2X_SP_RTNL_SETUP_TC, 1188 BNX2X_SP_RTNL_TX_TIMEOUT, |
1189 BNX2X_SP_RTNL_AFEX_F_UPDATE, |
|
1172 BNX2X_SP_RTNL_FAN_FAILURE, 1173}; 1174 1175 1176struct bnx2x_prev_path_list { 1177 u8 bus; 1178 u8 slot; 1179 u8 path; --- 115 unchanged lines hidden (view full) --- 1295#define BP_NOMCP(bp) (bp->flags & NO_MCP_FLAG) 1296#define GRO_ENABLE_FLAG (1 << 10) 1297#define MF_FUNC_DIS (1 << 11) 1298#define OWN_CNIC_IRQ (1 << 12) 1299#define NO_ISCSI_OOO_FLAG (1 << 13) 1300#define NO_ISCSI_FLAG (1 << 14) 1301#define NO_FCOE_FLAG (1 << 15) 1302#define BC_SUPPORTS_PFC_STATS (1 << 17) | 1190 BNX2X_SP_RTNL_FAN_FAILURE, 1191}; 1192 1193 1194struct bnx2x_prev_path_list { 1195 u8 bus; 1196 u8 slot; 1197 u8 path; --- 115 unchanged lines hidden (view full) --- 1313#define BP_NOMCP(bp) (bp->flags & NO_MCP_FLAG) 1314#define GRO_ENABLE_FLAG (1 << 10) 1315#define MF_FUNC_DIS (1 << 11) 1316#define OWN_CNIC_IRQ (1 << 12) 1317#define NO_ISCSI_OOO_FLAG (1 << 13) 1318#define NO_ISCSI_FLAG (1 << 14) 1319#define NO_FCOE_FLAG (1 << 15) 1320#define BC_SUPPORTS_PFC_STATS (1 << 17) |
1321#define USING_SINGLE_MSIX_FLAG (1 << 20) |
|
1303 1304#define NO_ISCSI(bp) ((bp)->flags & NO_ISCSI_FLAG) 1305#define NO_ISCSI_OOO(bp) ((bp)->flags & NO_ISCSI_OOO_FLAG) 1306#define NO_FCOE(bp) ((bp)->flags & NO_FCOE_FLAG) 1307 1308 int pm_cap; 1309 int mrrs; 1310 --- 13 unchanged lines hidden (view full) --- 1324 u32 link_cnt; 1325 struct bnx2x_link_report_data last_reported_link; 1326 1327 struct mdio_if_info mdio; 1328 1329 struct bnx2x_common common; 1330 struct bnx2x_port port; 1331 | 1322 1323#define NO_ISCSI(bp) ((bp)->flags & NO_ISCSI_FLAG) 1324#define NO_ISCSI_OOO(bp) ((bp)->flags & NO_ISCSI_OOO_FLAG) 1325#define NO_FCOE(bp) ((bp)->flags & NO_FCOE_FLAG) 1326 1327 int pm_cap; 1328 int mrrs; 1329 --- 13 unchanged lines hidden (view full) --- 1343 u32 link_cnt; 1344 struct bnx2x_link_report_data last_reported_link; 1345 1346 struct mdio_if_info mdio; 1347 1348 struct bnx2x_common common; 1349 struct bnx2x_port port; 1350 |
1332 struct cmng_struct_per_port cmng; 1333 u32 vn_weight_sum; | 1351 struct cmng_init cmng; 1352 |
1334 u32 mf_config[E1HVN_MAX]; | 1353 u32 mf_config[E1HVN_MAX]; |
1335 u32 mf2_config[E2_FUNC_MAX]; | 1354 u32 mf_ext_config; |
1336 u32 path_has_ovlan; /* E3 */ 1337 u16 mf_ov; 1338 u8 mf_mode; 1339#define IS_MF(bp) (bp->mf_mode != 0) 1340#define IS_MF_SI(bp) (bp->mf_mode == MULTI_FUNCTION_SI) 1341#define IS_MF_SD(bp) (bp->mf_mode == MULTI_FUNCTION_SD) | 1355 u32 path_has_ovlan; /* E3 */ 1356 u16 mf_ov; 1357 u8 mf_mode; 1358#define IS_MF(bp) (bp->mf_mode != 0) 1359#define IS_MF_SI(bp) (bp->mf_mode == MULTI_FUNCTION_SI) 1360#define IS_MF_SD(bp) (bp->mf_mode == MULTI_FUNCTION_SD) |
1361#define IS_MF_AFEX(bp) (bp->mf_mode == MULTI_FUNCTION_AFEX) |
|
1342 1343 u8 wol; 1344 1345 bool gro_check; 1346 1347 int rx_ring_size; 1348 1349 u16 tx_quick_cons_trip_int; --- 16 unchanged lines hidden (view full) --- 1366#define BNX2X_STATE_OPENING_WAIT4_PORT 0x2000 1367#define BNX2X_STATE_OPEN 0x3000 1368#define BNX2X_STATE_CLOSING_WAIT4_HALT 0x4000 1369#define BNX2X_STATE_CLOSING_WAIT4_DELETE 0x5000 1370 1371#define BNX2X_STATE_DIAG 0xe000 1372#define BNX2X_STATE_ERROR 0xf000 1373 | 1362 1363 u8 wol; 1364 1365 bool gro_check; 1366 1367 int rx_ring_size; 1368 1369 u16 tx_quick_cons_trip_int; --- 16 unchanged lines hidden (view full) --- 1386#define BNX2X_STATE_OPENING_WAIT4_PORT 0x2000 1387#define BNX2X_STATE_OPEN 0x3000 1388#define BNX2X_STATE_CLOSING_WAIT4_HALT 0x4000 1389#define BNX2X_STATE_CLOSING_WAIT4_DELETE 0x5000 1390 1391#define BNX2X_STATE_DIAG 0xe000 1392#define BNX2X_STATE_ERROR 0xf000 1393 |
1374 int multi_mode; | |
1375#define BNX2X_MAX_PRIORITY 8 1376#define BNX2X_MAX_ENTRIES_PER_PRI 16 1377#define BNX2X_MAX_COS 3 1378#define BNX2X_MAX_TX_COS 2 1379 int num_queues; 1380 int disable_tpa; 1381 1382 u32 rx_mode; --- 194 unchanged lines hidden (view full) --- 1577 /* DCBX Negotation results */ 1578 struct dcbx_features dcbx_local_feat; 1579 u32 dcbx_error; 1580 1581#ifdef BCM_DCBNL 1582 struct dcbx_features dcbx_remote_feat; 1583 u32 dcbx_remote_flags; 1584#endif | 1394#define BNX2X_MAX_PRIORITY 8 1395#define BNX2X_MAX_ENTRIES_PER_PRI 16 1396#define BNX2X_MAX_COS 3 1397#define BNX2X_MAX_TX_COS 2 1398 int num_queues; 1399 int disable_tpa; 1400 1401 u32 rx_mode; --- 194 unchanged lines hidden (view full) --- 1596 /* DCBX Negotation results */ 1597 struct dcbx_features dcbx_local_feat; 1598 u32 dcbx_error; 1599 1600#ifdef BCM_DCBNL 1601 struct dcbx_features dcbx_remote_feat; 1602 u32 dcbx_remote_flags; 1603#endif |
1604 /* AFEX: store default vlan used */ 1605 int afex_def_vlan_tag; 1606 enum mf_cfg_afex_vlan_mode afex_vlan_mode; |
|
1585 u32 pending_max; 1586 1587 /* multiple tx classes of service */ 1588 u8 max_cos; 1589 1590 /* priority to cos mapping */ 1591 u8 prio_to_cos[8]; 1592}; --- 540 unchanged lines hidden (view full) --- 2133 (BNX2X_MF_SD_PROTOCOL(bp) == FUNC_MF_CFG_PROTOCOL_ISCSI) 2134 2135#define BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp) \ 2136 (BNX2X_MF_SD_PROTOCOL(bp) == FUNC_MF_CFG_PROTOCOL_FCOE) 2137 2138#define IS_MF_ISCSI_SD(bp) (IS_MF_SD(bp) && BNX2X_IS_MF_SD_PROTOCOL_ISCSI(bp)) 2139#define IS_MF_FCOE_SD(bp) (IS_MF_SD(bp) && BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp)) 2140 | 1607 u32 pending_max; 1608 1609 /* multiple tx classes of service */ 1610 u8 max_cos; 1611 1612 /* priority to cos mapping */ 1613 u8 prio_to_cos[8]; 1614}; --- 540 unchanged lines hidden (view full) --- 2155 (BNX2X_MF_SD_PROTOCOL(bp) == FUNC_MF_CFG_PROTOCOL_ISCSI) 2156 2157#define BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp) \ 2158 (BNX2X_MF_SD_PROTOCOL(bp) == FUNC_MF_CFG_PROTOCOL_FCOE) 2159 2160#define IS_MF_ISCSI_SD(bp) (IS_MF_SD(bp) && BNX2X_IS_MF_SD_PROTOCOL_ISCSI(bp)) 2161#define IS_MF_FCOE_SD(bp) (IS_MF_SD(bp) && BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp)) 2162 |
2163#define BNX2X_MF_EXT_PROTOCOL_FCOE(bp) ((bp)->mf_ext_config & \ 2164 MACP_FUNC_CFG_FLAGS_FCOE_OFFLOAD) 2165 2166#define IS_MF_FCOE_AFEX(bp) (IS_MF_AFEX(bp) && BNX2X_MF_EXT_PROTOCOL_FCOE(bp)) |
|
2141#define IS_MF_STORAGE_SD(bp) (IS_MF_SD(bp) && \ 2142 (BNX2X_IS_MF_SD_PROTOCOL_ISCSI(bp) || \ 2143 BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp))) | 2167#define IS_MF_STORAGE_SD(bp) (IS_MF_SD(bp) && \ 2168 (BNX2X_IS_MF_SD_PROTOCOL_ISCSI(bp) || \ 2169 BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp))) |
2170#else 2171#define IS_MF_FCOE_AFEX(bp) false |
|
2144#endif 2145 | 2172#endif 2173 |
2174 |
|
2146#endif /* bnx2x.h */ | 2175#endif /* bnx2x.h */ |