diff options
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_link.h')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_link.h | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/drivers/net/bnx2x/bnx2x_link.h b/drivers/net/bnx2x/bnx2x_link.h index bedab1a942c..92f36b6950d 100644 --- a/drivers/net/bnx2x/bnx2x_link.h +++ b/drivers/net/bnx2x/bnx2x_link.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* Copyright 2008-2010 Broadcom Corporation | 1 | /* Copyright 2008-2011 Broadcom Corporation |
2 | * | 2 | * |
3 | * Unless you and Broadcom execute a separate written software license | 3 | * Unless you and Broadcom execute a separate written software license |
4 | * agreement governing use of this software, this software is licensed to you | 4 | * agreement governing use of this software, this software is licensed to you |
@@ -33,7 +33,7 @@ | |||
33 | #define BNX2X_FLOW_CTRL_BOTH PORT_FEATURE_FLOW_CONTROL_BOTH | 33 | #define BNX2X_FLOW_CTRL_BOTH PORT_FEATURE_FLOW_CONTROL_BOTH |
34 | #define BNX2X_FLOW_CTRL_NONE PORT_FEATURE_FLOW_CONTROL_NONE | 34 | #define BNX2X_FLOW_CTRL_NONE PORT_FEATURE_FLOW_CONTROL_NONE |
35 | 35 | ||
36 | #define SPEED_AUTO_NEG 0 | 36 | #define SPEED_AUTO_NEG 0 |
37 | #define SPEED_12000 12000 | 37 | #define SPEED_12000 12000 |
38 | #define SPEED_12500 12500 | 38 | #define SPEED_12500 12500 |
39 | #define SPEED_13000 13000 | 39 | #define SPEED_13000 13000 |
@@ -44,8 +44,8 @@ | |||
44 | #define SFP_EEPROM_VENDOR_NAME_SIZE 16 | 44 | #define SFP_EEPROM_VENDOR_NAME_SIZE 16 |
45 | #define SFP_EEPROM_VENDOR_OUI_ADDR 0x25 | 45 | #define SFP_EEPROM_VENDOR_OUI_ADDR 0x25 |
46 | #define SFP_EEPROM_VENDOR_OUI_SIZE 3 | 46 | #define SFP_EEPROM_VENDOR_OUI_SIZE 3 |
47 | #define SFP_EEPROM_PART_NO_ADDR 0x28 | 47 | #define SFP_EEPROM_PART_NO_ADDR 0x28 |
48 | #define SFP_EEPROM_PART_NO_SIZE 16 | 48 | #define SFP_EEPROM_PART_NO_SIZE 16 |
49 | #define PWR_FLT_ERR_MSG_LEN 250 | 49 | #define PWR_FLT_ERR_MSG_LEN 250 |
50 | 50 | ||
51 | #define XGXS_EXT_PHY_TYPE(ext_phy_config) \ | 51 | #define XGXS_EXT_PHY_TYPE(ext_phy_config) \ |
@@ -62,7 +62,7 @@ | |||
62 | #define SINGLE_MEDIA(params) (params->num_phys == 2) | 62 | #define SINGLE_MEDIA(params) (params->num_phys == 2) |
63 | /* Dual Media board contains two external phy with different media */ | 63 | /* Dual Media board contains two external phy with different media */ |
64 | #define DUAL_MEDIA(params) (params->num_phys == 3) | 64 | #define DUAL_MEDIA(params) (params->num_phys == 3) |
65 | #define FW_PARAM_MDIO_CTRL_OFFSET 16 | 65 | #define FW_PARAM_MDIO_CTRL_OFFSET 16 |
66 | #define FW_PARAM_SET(phy_addr, phy_type, mdio_access) \ | 66 | #define FW_PARAM_SET(phy_addr, phy_type, mdio_access) \ |
67 | (phy_addr | phy_type | mdio_access << FW_PARAM_MDIO_CTRL_OFFSET) | 67 | (phy_addr | phy_type | mdio_access << FW_PARAM_MDIO_CTRL_OFFSET) |
68 | 68 | ||
@@ -201,12 +201,14 @@ struct link_params { | |||
201 | 201 | ||
202 | /* Default / User Configuration */ | 202 | /* Default / User Configuration */ |
203 | u8 loopback_mode; | 203 | u8 loopback_mode; |
204 | #define LOOPBACK_NONE 0 | 204 | #define LOOPBACK_NONE 0 |
205 | #define LOOPBACK_EMAC 1 | 205 | #define LOOPBACK_EMAC 1 |
206 | #define LOOPBACK_BMAC 2 | 206 | #define LOOPBACK_BMAC 2 |
207 | #define LOOPBACK_XGXS 3 | 207 | #define LOOPBACK_XGXS 3 |
208 | #define LOOPBACK_EXT_PHY 4 | 208 | #define LOOPBACK_EXT_PHY 4 |
209 | #define LOOPBACK_EXT 5 | 209 | #define LOOPBACK_EXT 5 |
210 | #define LOOPBACK_UMAC 6 | ||
211 | #define LOOPBACK_XMAC 7 | ||
210 | 212 | ||
211 | /* Device parameters */ | 213 | /* Device parameters */ |
212 | u8 mac_addr[6]; | 214 | u8 mac_addr[6]; |
@@ -230,10 +232,11 @@ struct link_params { | |||
230 | /* Phy register parameter */ | 232 | /* Phy register parameter */ |
231 | u32 chip_id; | 233 | u32 chip_id; |
232 | 234 | ||
235 | /* features */ | ||
233 | u32 feature_config_flags; | 236 | u32 feature_config_flags; |
234 | #define FEATURE_CONFIG_OVERRIDE_PREEMPHASIS_ENABLED (1<<0) | 237 | #define FEATURE_CONFIG_OVERRIDE_PREEMPHASIS_ENABLED (1<<0) |
235 | #define FEATURE_CONFIG_PFC_ENABLED (1<<1) | 238 | #define FEATURE_CONFIG_PFC_ENABLED (1<<1) |
236 | #define FEATURE_CONFIG_BC_SUPPORTS_OPT_MDL_VRFY (1<<2) | 239 | #define FEATURE_CONFIG_BC_SUPPORTS_OPT_MDL_VRFY (1<<2) |
237 | #define FEATURE_CONFIG_BC_SUPPORTS_DUAL_PHY_OPT_MDL_VRFY (1<<3) | 240 | #define FEATURE_CONFIG_BC_SUPPORTS_DUAL_PHY_OPT_MDL_VRFY (1<<3) |
238 | /* Will be populated during common init */ | 241 | /* Will be populated during common init */ |
239 | struct bnx2x_phy phy[MAX_PHYS]; | 242 | struct bnx2x_phy phy[MAX_PHYS]; |
@@ -334,6 +337,11 @@ void bnx2x_ext_phy_hw_reset(struct bnx2x *bp, u8 port); | |||
334 | /* Reset the external of SFX7101 */ | 337 | /* Reset the external of SFX7101 */ |
335 | void bnx2x_sfx7101_sp_sw_reset(struct bnx2x *bp, struct bnx2x_phy *phy); | 338 | void bnx2x_sfx7101_sp_sw_reset(struct bnx2x *bp, struct bnx2x_phy *phy); |
336 | 339 | ||
340 | /* Read "byte_cnt" bytes from address "addr" from the SFP+ EEPROM */ | ||
341 | u8 bnx2x_read_sfp_module_eeprom(struct bnx2x_phy *phy, | ||
342 | struct link_params *params, u16 addr, | ||
343 | u8 byte_cnt, u8 *o_buf); | ||
344 | |||
337 | void bnx2x_hw_reset_phy(struct link_params *params); | 345 | void bnx2x_hw_reset_phy(struct link_params *params); |
338 | 346 | ||
339 | /* Checks if HW lock is required for this phy/board type */ | 347 | /* Checks if HW lock is required for this phy/board type */ |
@@ -379,7 +387,7 @@ void bnx2x_ets_disabled(struct link_params *params); | |||
379 | 387 | ||
380 | /* Used to configure the ETS to BW limited */ | 388 | /* Used to configure the ETS to BW limited */ |
381 | void bnx2x_ets_bw_limit(const struct link_params *params, const u32 cos0_bw, | 389 | void bnx2x_ets_bw_limit(const struct link_params *params, const u32 cos0_bw, |
382 | const u32 cos1_bw); | 390 | const u32 cos1_bw); |
383 | 391 | ||
384 | /* Used to configure the ETS to strict */ | 392 | /* Used to configure the ETS to strict */ |
385 | u8 bnx2x_ets_strict(const struct link_params *params, const u8 strict_cos); | 393 | u8 bnx2x_ets_strict(const struct link_params *params, const u8 strict_cos); |