All of lore.kernel.org
 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

* Re: [PATCH] e1000: limit udelay for phy changes to 10000us
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Kirsher @ 2013-04-21  3:34 UTC (permalink / raw)
  To: Andi Kleen; +Cc: netdev, Andi Kleen

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

On Sat, 2013-04-20 at 20:31 -0700, Andi Kleen wrote:
> 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(-) 

Thanks Andi, I will add the patch to my igb queue.  Do you want me to
fix up the patch title as well? :-) (s/e1000/igb/)

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH] e1000: limit udelay for phy changes to 10000us
  2013-04-21  3:34 ` Jeff Kirsher
@ 2013-04-21 14:27   ` Andi Kleen
  0 siblings, 0 replies; 3+ messages in thread
From: Andi Kleen @ 2013-04-21 14:27 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: Andi Kleen, netdev, Andi Kleen

On Sat, Apr 20, 2013 at 08:34:45PM -0700, Jeff Kirsher wrote:
> On Sat, 2013-04-20 at 20:31 -0700, Andi Kleen wrote:
> > 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(-) 
> 
> Thanks Andi, I will add the patch to my igb queue.  Do you want me to
> fix up the patch title as well? :-) (s/e1000/igb/)

Sure please fix.

BTW I'm not sure my fix/value is right. If you really need 100000us you need
some other mechanism to wait.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

^ permalink raw reply	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.