diff options
Diffstat (limited to 'drivers/net/ethernet/intel/e1000e/phy.c')
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/phy.c | 59 |
1 files changed, 22 insertions, 37 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/phy.c b/drivers/net/ethernet/intel/e1000e/phy.c index 683abac4a049..6e768b11380e 100644 --- a/drivers/net/ethernet/intel/e1000e/phy.c +++ b/drivers/net/ethernet/intel/e1000e/phy.c | |||
@@ -1007,12 +1007,12 @@ static s32 e1000_phy_setup_autoneg(struct e1000_hw *hw) | |||
1007 | * The possible values of the "fc" parameter are: | 1007 | * The possible values of the "fc" parameter are: |
1008 | * 0: Flow control is completely disabled | 1008 | * 0: Flow control is completely disabled |
1009 | * 1: Rx flow control is enabled (we can receive pause frames | 1009 | * 1: Rx flow control is enabled (we can receive pause frames |
1010 | * but not send pause frames). | 1010 | * but not send pause frames). |
1011 | * 2: Tx flow control is enabled (we can send pause frames | 1011 | * 2: Tx flow control is enabled (we can send pause frames |
1012 | * but we do not support receiving pause frames). | 1012 | * but we do not support receiving pause frames). |
1013 | * 3: Both Rx and Tx flow control (symmetric) are enabled. | 1013 | * 3: Both Rx and Tx flow control (symmetric) are enabled. |
1014 | * other: No software override. The flow control configuration | 1014 | * other: No software override. The flow control configuration |
1015 | * in the EEPROM is used. | 1015 | * in the EEPROM is used. |
1016 | */ | 1016 | */ |
1017 | switch (hw->fc.current_mode) { | 1017 | switch (hw->fc.current_mode) { |
1018 | case e1000_fc_none: | 1018 | case e1000_fc_none: |
@@ -1172,10 +1172,8 @@ s32 e1000e_setup_copper_link(struct e1000_hw *hw) | |||
1172 | * Check link status. Wait up to 100 microseconds for link to become | 1172 | * Check link status. Wait up to 100 microseconds for link to become |
1173 | * valid. | 1173 | * valid. |
1174 | */ | 1174 | */ |
1175 | ret_val = e1000e_phy_has_link_generic(hw, | 1175 | ret_val = e1000e_phy_has_link_generic(hw, COPPER_LINK_UP_LIMIT, 10, |
1176 | COPPER_LINK_UP_LIMIT, | 1176 | &link); |
1177 | 10, | ||
1178 | &link); | ||
1179 | if (ret_val) | 1177 | if (ret_val) |
1180 | return ret_val; | 1178 | return ret_val; |
1181 | 1179 | ||
@@ -1237,10 +1235,8 @@ s32 e1000e_phy_force_speed_duplex_igp(struct e1000_hw *hw) | |||
1237 | if (phy->autoneg_wait_to_complete) { | 1235 | if (phy->autoneg_wait_to_complete) { |
1238 | e_dbg("Waiting for forced speed/duplex link on IGP phy.\n"); | 1236 | e_dbg("Waiting for forced speed/duplex link on IGP phy.\n"); |
1239 | 1237 | ||
1240 | ret_val = e1000e_phy_has_link_generic(hw, | 1238 | ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, |
1241 | PHY_FORCE_LIMIT, | 1239 | 100000, &link); |
1242 | 100000, | ||
1243 | &link); | ||
1244 | if (ret_val) | 1240 | if (ret_val) |
1245 | return ret_val; | 1241 | return ret_val; |
1246 | 1242 | ||
@@ -1248,10 +1244,8 @@ s32 e1000e_phy_force_speed_duplex_igp(struct e1000_hw *hw) | |||
1248 | e_dbg("Link taking longer than expected.\n"); | 1244 | e_dbg("Link taking longer than expected.\n"); |
1249 | 1245 | ||
1250 | /* Try once more */ | 1246 | /* Try once more */ |
1251 | ret_val = e1000e_phy_has_link_generic(hw, | 1247 | ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, |
1252 | PHY_FORCE_LIMIT, | 1248 | 100000, &link); |
1253 | 100000, | ||
1254 | &link); | ||
1255 | } | 1249 | } |
1256 | 1250 | ||
1257 | return ret_val; | 1251 | return ret_val; |
@@ -1412,10 +1406,8 @@ s32 e1000_phy_force_speed_duplex_ife(struct e1000_hw *hw) | |||
1412 | if (phy->autoneg_wait_to_complete) { | 1406 | if (phy->autoneg_wait_to_complete) { |
1413 | e_dbg("Waiting for forced speed/duplex link on IFE phy.\n"); | 1407 | e_dbg("Waiting for forced speed/duplex link on IFE phy.\n"); |
1414 | 1408 | ||
1415 | ret_val = e1000e_phy_has_link_generic(hw, | 1409 | ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, |
1416 | PHY_FORCE_LIMIT, | 1410 | 100000, &link); |
1417 | 100000, | ||
1418 | &link); | ||
1419 | if (ret_val) | 1411 | if (ret_val) |
1420 | return ret_val; | 1412 | return ret_val; |
1421 | 1413 | ||
@@ -1423,10 +1415,8 @@ s32 e1000_phy_force_speed_duplex_ife(struct e1000_hw *hw) | |||
1423 | e_dbg("Link taking longer than expected.\n"); | 1415 | e_dbg("Link taking longer than expected.\n"); |
1424 | 1416 | ||
1425 | /* Try once more */ | 1417 | /* Try once more */ |
1426 | ret_val = e1000e_phy_has_link_generic(hw, | 1418 | ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, |
1427 | PHY_FORCE_LIMIT, | 1419 | 100000, &link); |
1428 | 100000, | ||
1429 | &link); | ||
1430 | if (ret_val) | 1420 | if (ret_val) |
1431 | return ret_val; | 1421 | return ret_val; |
1432 | } | 1422 | } |
@@ -2167,6 +2157,7 @@ s32 e1000e_phy_hw_reset_generic(struct e1000_hw *hw) | |||
2167 | s32 e1000e_get_cfg_done(struct e1000_hw *hw) | 2157 | s32 e1000e_get_cfg_done(struct e1000_hw *hw) |
2168 | { | 2158 | { |
2169 | mdelay(10); | 2159 | mdelay(10); |
2160 | |||
2170 | return 0; | 2161 | return 0; |
2171 | } | 2162 | } |
2172 | 2163 | ||
@@ -3155,13 +3146,11 @@ s32 e1000_link_stall_workaround_hv(struct e1000_hw *hw) | |||
3155 | if (ret_val) | 3146 | if (ret_val) |
3156 | return ret_val; | 3147 | return ret_val; |
3157 | 3148 | ||
3158 | data &= BM_CS_STATUS_LINK_UP | | 3149 | data &= BM_CS_STATUS_LINK_UP | BM_CS_STATUS_RESOLVED | |
3159 | BM_CS_STATUS_RESOLVED | | 3150 | BM_CS_STATUS_SPEED_MASK; |
3160 | BM_CS_STATUS_SPEED_MASK; | ||
3161 | 3151 | ||
3162 | if (data != (BM_CS_STATUS_LINK_UP | | 3152 | if (data != (BM_CS_STATUS_LINK_UP | BM_CS_STATUS_RESOLVED | |
3163 | BM_CS_STATUS_RESOLVED | | 3153 | BM_CS_STATUS_SPEED_1000)) |
3164 | BM_CS_STATUS_SPEED_1000)) | ||
3165 | return 0; | 3154 | return 0; |
3166 | 3155 | ||
3167 | mdelay(200); | 3156 | mdelay(200); |
@@ -3227,10 +3216,8 @@ s32 e1000_phy_force_speed_duplex_82577(struct e1000_hw *hw) | |||
3227 | if (phy->autoneg_wait_to_complete) { | 3216 | if (phy->autoneg_wait_to_complete) { |
3228 | e_dbg("Waiting for forced speed/duplex link on 82577 phy\n"); | 3217 | e_dbg("Waiting for forced speed/duplex link on 82577 phy\n"); |
3229 | 3218 | ||
3230 | ret_val = e1000e_phy_has_link_generic(hw, | 3219 | ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, |
3231 | PHY_FORCE_LIMIT, | 3220 | 100000, &link); |
3232 | 100000, | ||
3233 | &link); | ||
3234 | if (ret_val) | 3221 | if (ret_val) |
3235 | return ret_val; | 3222 | return ret_val; |
3236 | 3223 | ||
@@ -3238,10 +3225,8 @@ s32 e1000_phy_force_speed_duplex_82577(struct e1000_hw *hw) | |||
3238 | e_dbg("Link taking longer than expected.\n"); | 3225 | e_dbg("Link taking longer than expected.\n"); |
3239 | 3226 | ||
3240 | /* Try once more */ | 3227 | /* Try once more */ |
3241 | ret_val = e1000e_phy_has_link_generic(hw, | 3228 | ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, |
3242 | PHY_FORCE_LIMIT, | 3229 | 100000, &link); |
3243 | 100000, | ||
3244 | &link); | ||
3245 | } | 3230 | } |
3246 | 3231 | ||
3247 | return ret_val; | 3232 | return ret_val; |