From: Andi Kleen <andi@firstfloor.org>
To: jeffrey.t.kirsher@intel.com
Cc: netdev@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: [PATCH] e1000: limit udelay for phy changes to 10000us
Date: Sat, 20 Apr 2013 20:31:35 -0700 [thread overview]
Message-ID: <1366515095-17734-1-git-send-email-andi@firstfloor.org> (raw)
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
next reply other threads:[~2013-04-21 3:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-21 3:31 Andi Kleen [this message]
2013-04-21 3:34 ` [PATCH] e1000: limit udelay for phy changes to 10000us Jeff Kirsher
2013-04-21 14:27 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1366515095-17734-1-git-send-email-andi@firstfloor.org \
--to=andi@firstfloor.org \
--cc=ak@linux.intel.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).