diff options
author | Barak Witkowski <barak@broadcom.com> | 2012-04-22 23:04:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-23 22:34:03 -0400 |
commit | a334872224a67b614dc888460377862621f3dac7 (patch) | |
tree | 11c49dcbdaa681d75f18b858976d2a3d48e250cd /drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | |
parent | 5b263f5374ea70daa61ed9f5cc5d8f4ac236efbd (diff) |
bnx2x: add afex support
Following patch adds afex multifunction support to the driver (afex
multifunction is based on vntag header) and updates FW version used to 7.2.51.
Support includes the following:
1. Configure vif parameters in firmware (default vlan, vif id, default
priority, allowed priorities) according to values received from NIC.
2. Configure FW to strip/add default vlan according to afex vlan mode.
3. Notify link up to OS only after vif is fully initialized.
4. Support vif list set/get requests and configure FW accordingly.
5. Supply afex statistics upon request from NIC.
6. Special handling to L2 interface in case of FCoE vif.
Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x.h')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h index bfa78883d5c7..0a5924301646 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | |||
@@ -1063,6 +1063,13 @@ struct bnx2x_slowpath { | |||
1063 | struct flow_control_configuration pfc_config; | 1063 | struct flow_control_configuration pfc_config; |
1064 | } func_rdata; | 1064 | } func_rdata; |
1065 | 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 | |||
1066 | /* used by dmae command executer */ | 1073 | /* used by dmae command executer */ |
1067 | struct dmae_command dmae[MAX_DMAE_C]; | 1074 | struct dmae_command dmae[MAX_DMAE_C]; |
1068 | 1075 | ||
@@ -1179,6 +1186,7 @@ struct bnx2x_fw_stats_data { | |||
1179 | enum { | 1186 | enum { |
1180 | BNX2X_SP_RTNL_SETUP_TC, | 1187 | BNX2X_SP_RTNL_SETUP_TC, |
1181 | BNX2X_SP_RTNL_TX_TIMEOUT, | 1188 | BNX2X_SP_RTNL_TX_TIMEOUT, |
1189 | BNX2X_SP_RTNL_AFEX_F_UPDATE, | ||
1182 | BNX2X_SP_RTNL_FAN_FAILURE, | 1190 | BNX2X_SP_RTNL_FAN_FAILURE, |
1183 | }; | 1191 | }; |
1184 | 1192 | ||
@@ -1343,13 +1351,14 @@ struct bnx2x { | |||
1343 | struct cmng_init cmng; | 1351 | struct cmng_init cmng; |
1344 | 1352 | ||
1345 | u32 mf_config[E1HVN_MAX]; | 1353 | u32 mf_config[E1HVN_MAX]; |
1346 | u32 mf2_config[E2_FUNC_MAX]; | 1354 | u32 mf_ext_config; |
1347 | u32 path_has_ovlan; /* E3 */ | 1355 | u32 path_has_ovlan; /* E3 */ |
1348 | u16 mf_ov; | 1356 | u16 mf_ov; |
1349 | u8 mf_mode; | 1357 | u8 mf_mode; |
1350 | #define IS_MF(bp) (bp->mf_mode != 0) | 1358 | #define IS_MF(bp) (bp->mf_mode != 0) |
1351 | #define IS_MF_SI(bp) (bp->mf_mode == MULTI_FUNCTION_SI) | 1359 | #define IS_MF_SI(bp) (bp->mf_mode == MULTI_FUNCTION_SI) |
1352 | #define IS_MF_SD(bp) (bp->mf_mode == MULTI_FUNCTION_SD) | 1360 | #define IS_MF_SD(bp) (bp->mf_mode == MULTI_FUNCTION_SD) |
1361 | #define IS_MF_AFEX(bp) (bp->mf_mode == MULTI_FUNCTION_AFEX) | ||
1353 | 1362 | ||
1354 | u8 wol; | 1363 | u8 wol; |
1355 | 1364 | ||
@@ -1592,6 +1601,9 @@ struct bnx2x { | |||
1592 | struct dcbx_features dcbx_remote_feat; | 1601 | struct dcbx_features dcbx_remote_feat; |
1593 | u32 dcbx_remote_flags; | 1602 | u32 dcbx_remote_flags; |
1594 | #endif | 1603 | #endif |
1604 | /* AFEX: store default vlan used */ | ||
1605 | int afex_def_vlan_tag; | ||
1606 | enum mf_cfg_afex_vlan_mode afex_vlan_mode; | ||
1595 | u32 pending_max; | 1607 | u32 pending_max; |
1596 | 1608 | ||
1597 | /* multiple tx classes of service */ | 1609 | /* multiple tx classes of service */ |
@@ -2148,9 +2160,16 @@ void bnx2x_notify_link_changed(struct bnx2x *bp); | |||
2148 | #define IS_MF_ISCSI_SD(bp) (IS_MF_SD(bp) && BNX2X_IS_MF_SD_PROTOCOL_ISCSI(bp)) | 2160 | #define IS_MF_ISCSI_SD(bp) (IS_MF_SD(bp) && BNX2X_IS_MF_SD_PROTOCOL_ISCSI(bp)) |
2149 | #define IS_MF_FCOE_SD(bp) (IS_MF_SD(bp) && BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp)) | 2161 | #define IS_MF_FCOE_SD(bp) (IS_MF_SD(bp) && BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp)) |
2150 | 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)) | ||
2151 | #define IS_MF_STORAGE_SD(bp) (IS_MF_SD(bp) && \ | 2167 | #define IS_MF_STORAGE_SD(bp) (IS_MF_SD(bp) && \ |
2152 | (BNX2X_IS_MF_SD_PROTOCOL_ISCSI(bp) || \ | 2168 | (BNX2X_IS_MF_SD_PROTOCOL_ISCSI(bp) || \ |
2153 | BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp))) | 2169 | BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp))) |
2170 | #else | ||
2171 | #define IS_MF_FCOE_AFEX(bp) false | ||
2154 | #endif | 2172 | #endif |
2155 | 2173 | ||
2174 | |||
2156 | #endif /* bnx2x.h */ | 2175 | #endif /* bnx2x.h */ |