aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorMatthew Vick <matthew.vick@intel.com>2012-10-16 03:44:45 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-10-30 02:49:11 -0400
commit9f0b8516198e8b0919774a1874fab064a2ea3ae8 (patch)
tree60a59c1c1e6bcb9d6fa6d279bf2e3422e84aea2e /drivers/net
parent91ffb8e0dc662868addeff9fd013145c49a43c4a (diff)
igb: Enable auto-crossover during forced operation on 82580 and above.
Newer devices supported by igb can support auto-crossover detection in forced operation modes. Enable this in the driver, rather than clobbering this functionality in forced operation. Signed-off-by: Matthew Vick <matthew.vick@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_mac.c4
-rw-r--r--drivers/net/ethernet/intel/igb/e1000_phy.c29
2 files changed, 21 insertions, 12 deletions
diff --git a/drivers/net/ethernet/intel/igb/e1000_mac.c b/drivers/net/ethernet/intel/igb/e1000_mac.c
index 819c145ac762..7acddfe9e6d5 100644
--- a/drivers/net/ethernet/intel/igb/e1000_mac.c
+++ b/drivers/net/ethernet/intel/igb/e1000_mac.c
@@ -1391,6 +1391,10 @@ s32 igb_validate_mdi_setting(struct e1000_hw *hw)
1391{ 1391{
1392 s32 ret_val = 0; 1392 s32 ret_val = 0;
1393 1393
1394 /* All MDI settings are supported on 82580 and newer. */
1395 if (hw->mac.type >= e1000_82580)
1396 goto out;
1397
1394 if (!hw->mac.autoneg && (hw->phy.mdix == 0 || hw->phy.mdix == 3)) { 1398 if (!hw->mac.autoneg && (hw->phy.mdix == 0 || hw->phy.mdix == 3)) {
1395 hw_dbg("Invalid MDI setting detected\n"); 1399 hw_dbg("Invalid MDI setting detected\n");
1396 hw->phy.mdix = 1; 1400 hw->phy.mdix = 1;
diff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net/ethernet/intel/igb/e1000_phy.c
index c62a4c388194..fe76004aca4e 100644
--- a/drivers/net/ethernet/intel/igb/e1000_phy.c
+++ b/drivers/net/ethernet/intel/igb/e1000_phy.c
@@ -1207,20 +1207,25 @@ s32 igb_phy_force_speed_duplex_m88(struct e1000_hw *hw)
1207 u16 phy_data; 1207 u16 phy_data;
1208 bool link; 1208 bool link;
1209 1209
1210 /* 1210 /* I210 and I211 devices support Auto-Crossover in forced operation. */
1211 * Clear Auto-Crossover to force MDI manually. M88E1000 requires MDI 1211 if (phy->type != e1000_phy_i210) {
1212 * forced whenever speed and duplex are forced. 1212 /*
1213 */ 1213 * Clear Auto-Crossover to force MDI manually. M88E1000
1214 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); 1214 * requires MDI forced whenever speed and duplex are forced.
1215 if (ret_val) 1215 */
1216 goto out; 1216 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL,
1217 &phy_data);
1218 if (ret_val)
1219 goto out;
1217 1220
1218 phy_data &= ~M88E1000_PSCR_AUTO_X_MODE; 1221 phy_data &= ~M88E1000_PSCR_AUTO_X_MODE;
1219 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); 1222 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL,
1220 if (ret_val) 1223 phy_data);
1221 goto out; 1224 if (ret_val)
1225 goto out;
1222 1226
1223 hw_dbg("M88E1000 PSCR: %X\n", phy_data); 1227 hw_dbg("M88E1000 PSCR: %X\n", phy_data);
1228 }
1224 1229
1225 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data); 1230 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
1226 if (ret_val) 1231 if (ret_val)