diff options
author | Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> | 2009-06-04 12:02:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-07 08:20:26 -0400 |
commit | 794caeb259bc5d341bcc80dd37820073147a231c (patch) | |
tree | c932f796a96c6c7dcd6611ef2c8425b644ad0458 /drivers/net/ixgbe/ixgbe_82599.c | |
parent | ae540af18597a441bf17a26389179465ea4b9c36 (diff) |
ixgbe: Add FW detection and warning for 82599 SFP+ adapters
82599 has a FW running that helps manage the internal SFI PHY. There are
also a number of pre-production samples of these SFI-based devices in the
field. This patch adds a check to look for the firmware running on all
SFP+ based adapters, and displays a warning to the system log if a
pre-production adapter is identified. The driver will continue loading
though, with no functional degradation.
Also remove an old function prototype from ixgbe_82599.c that isn't being
used.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_82599.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_82599.c | 58 |
1 files changed, 55 insertions, 3 deletions
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c index 5c2627b68c2d..1984cab7d48b 100644 --- a/drivers/net/ixgbe/ixgbe_82599.c +++ b/drivers/net/ixgbe/ixgbe_82599.c | |||
@@ -71,10 +71,10 @@ s32 ixgbe_clear_vfta_82599(struct ixgbe_hw *hw); | |||
71 | s32 ixgbe_init_uta_tables_82599(struct ixgbe_hw *hw); | 71 | s32 ixgbe_init_uta_tables_82599(struct ixgbe_hw *hw); |
72 | s32 ixgbe_read_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 *val); | 72 | s32 ixgbe_read_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 *val); |
73 | s32 ixgbe_write_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 val); | 73 | s32 ixgbe_write_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 val); |
74 | s32 ixgbe_start_hw_rev_0_82599(struct ixgbe_hw *hw); | ||
75 | s32 ixgbe_identify_phy_82599(struct ixgbe_hw *hw); | 74 | s32 ixgbe_identify_phy_82599(struct ixgbe_hw *hw); |
76 | s32 ixgbe_start_hw_82599(struct ixgbe_hw *hw); | 75 | s32 ixgbe_start_hw_82599(struct ixgbe_hw *hw); |
77 | u32 ixgbe_get_supported_physical_layer_82599(struct ixgbe_hw *hw); | 76 | u32 ixgbe_get_supported_physical_layer_82599(struct ixgbe_hw *hw); |
77 | static s32 ixgbe_verify_fw_version_82599(struct ixgbe_hw *hw); | ||
78 | 78 | ||
79 | void ixgbe_init_mac_link_ops_82599(struct ixgbe_hw *hw) | 79 | void ixgbe_init_mac_link_ops_82599(struct ixgbe_hw *hw) |
80 | { | 80 | { |
@@ -2142,8 +2142,9 @@ s32 ixgbe_write_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 val) | |||
2142 | s32 ixgbe_start_hw_82599(struct ixgbe_hw *hw) | 2142 | s32 ixgbe_start_hw_82599(struct ixgbe_hw *hw) |
2143 | { | 2143 | { |
2144 | u32 q_num; | 2144 | u32 q_num; |
2145 | s32 ret_val; | ||
2145 | 2146 | ||
2146 | ixgbe_start_hw_generic(hw); | 2147 | ret_val = ixgbe_start_hw_generic(hw); |
2147 | 2148 | ||
2148 | /* Clear the rate limiters */ | 2149 | /* Clear the rate limiters */ |
2149 | for (q_num = 0; q_num < hw->mac.max_tx_queues; q_num++) { | 2150 | for (q_num = 0; q_num < hw->mac.max_tx_queues; q_num++) { |
@@ -2155,7 +2156,10 @@ s32 ixgbe_start_hw_82599(struct ixgbe_hw *hw) | |||
2155 | /* We need to run link autotry after the driver loads */ | 2156 | /* We need to run link autotry after the driver loads */ |
2156 | hw->mac.autotry_restart = true; | 2157 | hw->mac.autotry_restart = true; |
2157 | 2158 | ||
2158 | return 0; | 2159 | if (ret_val == 0) |
2160 | ret_val = ixgbe_verify_fw_version_82599(hw); | ||
2161 | |||
2162 | return ret_val; | ||
2159 | } | 2163 | } |
2160 | 2164 | ||
2161 | /** | 2165 | /** |
@@ -2407,6 +2411,54 @@ san_mac_addr_out: | |||
2407 | return 0; | 2411 | return 0; |
2408 | } | 2412 | } |
2409 | 2413 | ||
2414 | /** | ||
2415 | * ixgbe_verify_fw_version_82599 - verify fw version for 82599 | ||
2416 | * @hw: pointer to hardware structure | ||
2417 | * | ||
2418 | * Verifies that installed the firmware version is 0.6 or higher | ||
2419 | * for SFI devices. All 82599 SFI devices should have version 0.6 or higher. | ||
2420 | * | ||
2421 | * Returns IXGBE_ERR_EEPROM_VERSION if the FW is not present or | ||
2422 | * if the FW version is not supported. | ||
2423 | **/ | ||
2424 | static s32 ixgbe_verify_fw_version_82599(struct ixgbe_hw *hw) | ||
2425 | { | ||
2426 | s32 status = IXGBE_ERR_EEPROM_VERSION; | ||
2427 | u16 fw_offset, fw_ptp_cfg_offset; | ||
2428 | u16 fw_version = 0; | ||
2429 | |||
2430 | /* firmware check is only necessary for SFI devices */ | ||
2431 | if (hw->phy.media_type != ixgbe_media_type_fiber) { | ||
2432 | status = 0; | ||
2433 | goto fw_version_out; | ||
2434 | } | ||
2435 | |||
2436 | /* get the offset to the Firmware Module block */ | ||
2437 | hw->eeprom.ops.read(hw, IXGBE_FW_PTR, &fw_offset); | ||
2438 | |||
2439 | if ((fw_offset == 0) || (fw_offset == 0xFFFF)) | ||
2440 | goto fw_version_out; | ||
2441 | |||
2442 | /* get the offset to the Pass Through Patch Configuration block */ | ||
2443 | hw->eeprom.ops.read(hw, (fw_offset + | ||
2444 | IXGBE_FW_PASSTHROUGH_PATCH_CONFIG_PTR), | ||
2445 | &fw_ptp_cfg_offset); | ||
2446 | |||
2447 | if ((fw_ptp_cfg_offset == 0) || (fw_ptp_cfg_offset == 0xFFFF)) | ||
2448 | goto fw_version_out; | ||
2449 | |||
2450 | /* get the firmware version */ | ||
2451 | hw->eeprom.ops.read(hw, (fw_ptp_cfg_offset + | ||
2452 | IXGBE_FW_PATCH_VERSION_4), | ||
2453 | &fw_version); | ||
2454 | |||
2455 | if (fw_version > 0x5) | ||
2456 | status = 0; | ||
2457 | |||
2458 | fw_version_out: | ||
2459 | return status; | ||
2460 | } | ||
2461 | |||
2410 | static struct ixgbe_mac_operations mac_ops_82599 = { | 2462 | static struct ixgbe_mac_operations mac_ops_82599 = { |
2411 | .init_hw = &ixgbe_init_hw_generic, | 2463 | .init_hw = &ixgbe_init_hw_generic, |
2412 | .reset_hw = &ixgbe_reset_hw_82599, | 2464 | .reset_hw = &ixgbe_reset_hw_82599, |