[3.11.y.z extended stable] Patch "igb: Fix for issue where values could be too high for udelay" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Wed Dec 18 10:21:17 UTC 2013


This is a note to let you know that I have just added a patch titled

    igb: Fix for issue where values could be too high for udelay

to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From d397ca7eb7d507207dcd879c0e62b72bb62ed75f Mon Sep 17 00:00:00 2001
From: Carolyn Wyborny <carolyn.wyborny at intel.com>
Date: Sat, 14 Dec 2013 03:26:46 -0800
Subject: igb: Fix for issue where values could be too high for udelay
 function.

commit df29df92adda751ac04ca5149d30014b5199db81 upstream.

This patch changes the igb_phy_has_link function to check the value of the
parameter before deciding to use udelay or mdelay in order to be sure that
the value is not too high for udelay function.

Signed-off-by: Sunil K Pandey <sunil.k.pandey at intel.com>
Signed-off-by: Kevin B Smith <kevin.b.smith at intel.com>
Signed-off-by: Carolyn Wyborny <carolyn.wyborny at intel.com>
Tested-by: Aaron Brown <aaron.f.brown at intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 drivers/net/ethernet/intel/igb/e1000_phy.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net/ethernet/intel/igb/e1000_phy.c
index 6046194..4703d45 100644
--- a/drivers/net/ethernet/intel/igb/e1000_phy.c
+++ b/drivers/net/ethernet/intel/igb/e1000_phy.c
@@ -1719,7 +1719,10 @@ s32 igb_phy_has_link(struct e1000_hw *hw, u32 iterations,
 			 * ownership of the resources, wait and try again to
 			 * see if they have relinquished the resources yet.
 			 */
-			udelay(usec_interval);
+			if (usec_interval >= 1000)
+				mdelay(usec_interval/1000);
+			else
+				udelay(usec_interval);
 		}
 		ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
 		if (ret_val)
--
1.8.3.2





More information about the kernel-team mailing list