diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2009-10-05 06:35:03 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-06 14:59:23 -0700 |
commit | 81fadd81a5bc897c8d0424d1cd90cb999d8e12b0 (patch) | |
tree | f0b71e08c7818f1c5a6e711ea5c2b2e5c71379eb /drivers/net/igb/e1000_82575.c | |
parent | 285b4167458ec7cc49008b2e61cbe0362deed335 (diff) | |
download | talos-obmc-linux-81fadd81a5bc897c8d0424d1cd90cb999d8e12b0.tar.gz talos-obmc-linux-81fadd81a5bc897c8d0424d1cd90cb999d8e12b0.zip |
igb: move the generic copper link setup code into e1000_phy.c
This patch moves the generic portion of the copper link setup into a
seperate function in e1000_phy.c. This helps to reduce the size of
copper_link_setup_82575 and make it a bit more readable.
Signed-off-by: Alexander Duyck <alexander.h.duyck@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/igb/e1000_82575.c')
-rw-r--r-- | drivers/net/igb/e1000_82575.c | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c index 45063c25155a..5d345e3036a4 100644 --- a/drivers/net/igb/e1000_82575.c +++ b/drivers/net/igb/e1000_82575.c @@ -907,7 +907,6 @@ static s32 igb_setup_copper_link_82575(struct e1000_hw *hw) { u32 ctrl; s32 ret_val; - bool link; ctrl = rd32(E1000_CTRL); ctrl |= E1000_CTRL_SLU; @@ -940,44 +939,7 @@ static s32 igb_setup_copper_link_82575(struct e1000_hw *hw) if (ret_val) goto out; - if (hw->mac.autoneg) { - /* - * Setup autoneg and flow control advertisement - * and perform autonegotiation. - */ - ret_val = igb_copper_link_autoneg(hw); - if (ret_val) - goto out; - } else { - /* - * PHY will be set to 10H, 10F, 100H or 100F - * depending on user settings. - */ - hw_dbg("Forcing Speed and Duplex\n"); - ret_val = hw->phy.ops.force_speed_duplex(hw); - if (ret_val) { - hw_dbg("Error Forcing Speed and Duplex\n"); - goto out; - } - } - - /* - * Check link status. Wait up to 100 microseconds for link to become - * valid. - */ - ret_val = igb_phy_has_link(hw, COPPER_LINK_UP_LIMIT, 10, &link); - if (ret_val) - goto out; - - if (link) { - hw_dbg("Valid link established!!!\n"); - /* Config the MAC and PHY after link is up */ - igb_config_collision_dist(hw); - ret_val = igb_config_fc_after_link_up(hw); - } else { - hw_dbg("Unable to establish link!!!\n"); - } - + ret_val = igb_setup_copper_link(hw); out: return ret_val; } |