diff options
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) | |||
907 | { | 907 | { |
908 | u32 ctrl; | 908 | u32 ctrl; |
909 | s32 ret_val; | 909 | s32 ret_val; |
910 | bool link; | ||
911 | 910 | ||
912 | ctrl = rd32(E1000_CTRL); | 911 | ctrl = rd32(E1000_CTRL); |
913 | ctrl |= E1000_CTRL_SLU; | 912 | ctrl |= E1000_CTRL_SLU; |
@@ -940,44 +939,7 @@ static s32 igb_setup_copper_link_82575(struct e1000_hw *hw) | |||
940 | if (ret_val) | 939 | if (ret_val) |
941 | goto out; | 940 | goto out; |
942 | 941 | ||
943 | if (hw->mac.autoneg) { | 942 | ret_val = igb_setup_copper_link(hw); |
944 | /* | ||
945 | * Setup autoneg and flow control advertisement | ||
946 | * and perform autonegotiation. | ||
947 | */ | ||
948 | ret_val = igb_copper_link_autoneg(hw); | ||
949 | if (ret_val) | ||
950 | goto out; | ||
951 | } else { | ||
952 | /* | ||
953 | * PHY will be set to 10H, 10F, 100H or 100F | ||
954 | * depending on user settings. | ||
955 | */ | ||
956 | hw_dbg("Forcing Speed and Duplex\n"); | ||
957 | ret_val = hw->phy.ops.force_speed_duplex(hw); | ||
958 | if (ret_val) { | ||
959 | hw_dbg("Error Forcing Speed and Duplex\n"); | ||
960 | goto out; | ||
961 | } | ||
962 | } | ||
963 | |||
964 | /* | ||
965 | * Check link status. Wait up to 100 microseconds for link to become | ||
966 | * valid. | ||
967 | */ | ||
968 | ret_val = igb_phy_has_link(hw, COPPER_LINK_UP_LIMIT, 10, &link); | ||
969 | if (ret_val) | ||
970 | goto out; | ||
971 | |||
972 | if (link) { | ||
973 | hw_dbg("Valid link established!!!\n"); | ||
974 | /* Config the MAC and PHY after link is up */ | ||
975 | igb_config_collision_dist(hw); | ||
976 | ret_val = igb_config_fc_after_link_up(hw); | ||
977 | } else { | ||
978 | hw_dbg("Unable to establish link!!!\n"); | ||
979 | } | ||
980 | |||
981 | out: | 943 | out: |
982 | return ret_val; | 944 | return ret_val; |
983 | } | 945 | } |