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

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.

CC: stable kernel <stable@vger.kernel.org> # 3.9+
Signed-off-by: Sunil K Pandey <sunil.k.pandey@intel.com>
Signed-off-by: Kevin B Smith <kevin.b.smith@intel.com>
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Carolyn Wyborny and committed by David S. Miller df29df92 3c325ced

+4 -1
+4 -1
drivers/net/ethernet/intel/igb/e1000_phy.c
··· 1728 * ownership of the resources, wait and try again to 1729 * see if they have relinquished the resources yet. 1730 */ 1731 - udelay(usec_interval); 1732 } 1733 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); 1734 if (ret_val)
··· 1728 * ownership of the resources, wait and try again to 1729 * see if they have relinquished the resources yet. 1730 */ 1731 + if (usec_interval >= 1000) 1732 + mdelay(usec_interval/1000); 1733 + else 1734 + udelay(usec_interval); 1735 } 1736 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); 1737 if (ret_val)