netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] e1000: limit udelay for phy changes to 10000us
@ 2013-04-21  3:31 Andi Kleen
  2013-04-21  3:34 ` Jeff Kirsher
  0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2013-04-21  3:31 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, Andi Kleen

From: Andi Kleen <ak@linux.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@linux.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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-21 14:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-21  3:31 [PATCH] e1000: limit udelay for phy changes to 10000us Andi Kleen
2013-04-21  3:34 ` Jeff Kirsher
2013-04-21 14:27   ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).