Skip to content

Commit

Permalink
igb: limit udelay for phy changes to 10000us
Browse files Browse the repository at this point in the history
If you really want 100000us you should really use mdelay or so.

Found by the LTO kernel build

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Andi Kleen authored and Jeff Kirsher committed Apr 26, 2013
1 parent a3b87a4 commit dc3d226
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/intel/igb/e1000_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,15 +1130,15 @@ s32 igb_phy_force_speed_duplex_igp(struct e1000_hw *hw)
if (phy->autoneg_wait_to_complete) {
hw_dbg("Waiting for forced speed/duplex link on IGP phy.\n");

ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, 100000, &link);
ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, 10000, &link);
if (ret_val)
goto out;

if (!link)
hw_dbg("Link taking longer than expected.\n");

/* Try once more */
ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, 100000, &link);
ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, 10000, &link);
if (ret_val)
goto out;
}
Expand Down Expand Up @@ -1590,7 +1590,7 @@ s32 igb_phy_has_link(struct e1000_hw *hw, u32 iterations,
* it across the board.
*/
ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
if (ret_val) {
if (ret_val && usec_interval > 0) {
/* If the first read fails, another entity may have
* ownership of the resources, wait and try again to
* see if they have relinquished the resources yet.
Expand Down

0 comments on commit dc3d226

Please sign in to comment.