[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1366515095-17734-1-git-send-email-andi@firstfloor.org>
Date: Sat, 20 Apr 2013 20:31:35 -0700
From: Andi Kleen <andi@...stfloor.org>
To: jeffrey.t.kirsher@...el.com
Cc: netdev@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH] e1000: limit udelay for phy changes to 10000us
From: Andi Kleen <ak@...ux.intel.com>
If you really want 100000us you should really use mdelay or so.
Found by the LTO kernel build
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
drivers/net/ethernet/intel/igb/e1000_phy.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net/ethernet/intel/igb/e1000_phy.c
index 2918c97..a12a1c7 100644
--- a/drivers/net/ethernet/intel/igb/e1000_phy.c
+++ b/drivers/net/ethernet/intel/igb/e1000_phy.c
@@ -1169,7 +1169,7 @@ s32 igb_phy_force_speed_duplex_igp(struct e1000_hw *hw)
ret_val = igb_phy_has_link(hw,
PHY_FORCE_LIMIT,
- 100000,
+ 10000,
&link);
if (ret_val)
goto out;
@@ -1180,7 +1180,7 @@ s32 igb_phy_force_speed_duplex_igp(struct e1000_hw *hw)
/* Try once more */
ret_val = igb_phy_has_link(hw,
PHY_FORCE_LIMIT,
- 100000,
+ 10000,
&link);
if (ret_val)
goto out;
@@ -1642,7 +1642,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
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists