diff options
author | Akeem G Abodunrin <akeem.g.abodunrin@intel.com> | 2013-08-27 22:23:09 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-09-04 08:28:31 -0400 |
commit | f6878e39c726e13e1d0dfed863dcce81810e4a56 (patch) | |
tree | 512ebbddb1c073cd262613922c2d84739e8b48e6 /drivers/net | |
parent | f1b4d6214b04caed45f0938a1d769b0d8fe79a3b (diff) |
igb: Get speed and duplex for 1G non_copper devices
This patch changes how we get speed/duplex for non_copper devices; it
now uses pcs register to get current speed and duplex instead of using
generic status register that we use to detect speed/duplex for copper
devices.
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/intel/igb/e1000_82575.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c index 68dd7c8624c9..79b58353d849 100644 --- a/drivers/net/ethernet/intel/igb/e1000_82575.c +++ b/drivers/net/ethernet/intel/igb/e1000_82575.c | |||
@@ -1141,6 +1141,31 @@ static s32 igb_get_cfg_done_82575(struct e1000_hw *hw) | |||
1141 | } | 1141 | } |
1142 | 1142 | ||
1143 | /** | 1143 | /** |
1144 | * igb_get_link_up_info_82575 - Get link speed/duplex info | ||
1145 | * @hw: pointer to the HW structure | ||
1146 | * @speed: stores the current speed | ||
1147 | * @duplex: stores the current duplex | ||
1148 | * | ||
1149 | * This is a wrapper function, if using the serial gigabit media independent | ||
1150 | * interface, use PCS to retrieve the link speed and duplex information. | ||
1151 | * Otherwise, use the generic function to get the link speed and duplex info. | ||
1152 | **/ | ||
1153 | static s32 igb_get_link_up_info_82575(struct e1000_hw *hw, u16 *speed, | ||
1154 | u16 *duplex) | ||
1155 | { | ||
1156 | s32 ret_val; | ||
1157 | |||
1158 | if (hw->phy.media_type != e1000_media_type_copper) | ||
1159 | ret_val = igb_get_pcs_speed_and_duplex_82575(hw, speed, | ||
1160 | duplex); | ||
1161 | else | ||
1162 | ret_val = igb_get_speed_and_duplex_copper(hw, speed, | ||
1163 | duplex); | ||
1164 | |||
1165 | return ret_val; | ||
1166 | } | ||
1167 | |||
1168 | /** | ||
1144 | * igb_check_for_link_82575 - Check for link | 1169 | * igb_check_for_link_82575 - Check for link |
1145 | * @hw: pointer to the HW structure | 1170 | * @hw: pointer to the HW structure |
1146 | * | 1171 | * |
@@ -2723,7 +2748,7 @@ static struct e1000_mac_operations e1000_mac_ops_82575 = { | |||
2723 | .check_for_link = igb_check_for_link_82575, | 2748 | .check_for_link = igb_check_for_link_82575, |
2724 | .rar_set = igb_rar_set, | 2749 | .rar_set = igb_rar_set, |
2725 | .read_mac_addr = igb_read_mac_addr_82575, | 2750 | .read_mac_addr = igb_read_mac_addr_82575, |
2726 | .get_speed_and_duplex = igb_get_speed_and_duplex_copper, | 2751 | .get_speed_and_duplex = igb_get_link_up_info_82575, |
2727 | #ifdef CONFIG_IGB_HWMON | 2752 | #ifdef CONFIG_IGB_HWMON |
2728 | .get_thermal_sensor_data = igb_get_thermal_sensor_data_generic, | 2753 | .get_thermal_sensor_data = igb_get_thermal_sensor_data_generic, |
2729 | .init_thermal_sensor_thresh = igb_init_thermal_sensor_thresh_generic, | 2754 | .init_thermal_sensor_thresh = igb_init_thermal_sensor_thresh_generic, |