Commit 9f0b8516 authored by Matthew Vick's avatar Matthew Vick Committed by Jeff Kirsher

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: default avatarMatthew Vick <matthew.vick@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 91ffb8e0
...@@ -1391,6 +1391,10 @@ s32 igb_validate_mdi_setting(struct e1000_hw *hw) ...@@ -1391,6 +1391,10 @@ s32 igb_validate_mdi_setting(struct e1000_hw *hw)
{ {
s32 ret_val = 0; s32 ret_val = 0;
/* All MDI settings are supported on 82580 and newer. */
if (hw->mac.type >= e1000_82580)
goto out;
if (!hw->mac.autoneg && (hw->phy.mdix == 0 || hw->phy.mdix == 3)) { if (!hw->mac.autoneg && (hw->phy.mdix == 0 || hw->phy.mdix == 3)) {
hw_dbg("Invalid MDI setting detected\n"); hw_dbg("Invalid MDI setting detected\n");
hw->phy.mdix = 1; hw->phy.mdix = 1;
......
...@@ -1207,20 +1207,25 @@ s32 igb_phy_force_speed_duplex_m88(struct e1000_hw *hw) ...@@ -1207,20 +1207,25 @@ s32 igb_phy_force_speed_duplex_m88(struct e1000_hw *hw)
u16 phy_data; u16 phy_data;
bool link; bool link;
/* /* I210 and I211 devices support Auto-Crossover in forced operation. */
* Clear Auto-Crossover to force MDI manually. M88E1000 requires MDI if (phy->type != e1000_phy_i210) {
* forced whenever speed and duplex are forced. /*
*/ * Clear Auto-Crossover to force MDI manually. M88E1000
ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); * requires MDI forced whenever speed and duplex are forced.
if (ret_val) */
goto out; ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL,
&phy_data);
if (ret_val)
goto out;
phy_data &= ~M88E1000_PSCR_AUTO_X_MODE; phy_data &= ~M88E1000_PSCR_AUTO_X_MODE;
ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL,
if (ret_val) phy_data);
goto out; if (ret_val)
goto out;
hw_dbg("M88E1000 PSCR: %X\n", phy_data); hw_dbg("M88E1000 PSCR: %X\n", phy_data);
}
ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data); ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
if (ret_val) if (ret_val)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment