diff options
Diffstat (limited to 'drivers/net/ethernet/intel/e1000e/phy.c')
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/phy.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/phy.c b/drivers/net/ethernet/intel/e1000e/phy.c index da2be59505c0..20e71f4ca426 100644 --- a/drivers/net/ethernet/intel/e1000e/phy.c +++ b/drivers/net/ethernet/intel/e1000e/phy.c | |||
@@ -1757,19 +1757,23 @@ s32 e1000e_phy_has_link_generic(struct e1000_hw *hw, u32 iterations, | |||
1757 | * it across the board. | 1757 | * it across the board. |
1758 | */ | 1758 | */ |
1759 | ret_val = e1e_rphy(hw, MII_BMSR, &phy_status); | 1759 | ret_val = e1e_rphy(hw, MII_BMSR, &phy_status); |
1760 | if (ret_val) | 1760 | if (ret_val) { |
1761 | /* If the first read fails, another entity may have | 1761 | /* If the first read fails, another entity may have |
1762 | * ownership of the resources, wait and try again to | 1762 | * ownership of the resources, wait and try again to |
1763 | * see if they have relinquished the resources yet. | 1763 | * see if they have relinquished the resources yet. |
1764 | */ | 1764 | */ |
1765 | udelay(usec_interval); | 1765 | if (usec_interval >= 1000) |
1766 | msleep(usec_interval / 1000); | ||
1767 | else | ||
1768 | udelay(usec_interval); | ||
1769 | } | ||
1766 | ret_val = e1e_rphy(hw, MII_BMSR, &phy_status); | 1770 | ret_val = e1e_rphy(hw, MII_BMSR, &phy_status); |
1767 | if (ret_val) | 1771 | if (ret_val) |
1768 | break; | 1772 | break; |
1769 | if (phy_status & BMSR_LSTATUS) | 1773 | if (phy_status & BMSR_LSTATUS) |
1770 | break; | 1774 | break; |
1771 | if (usec_interval >= 1000) | 1775 | if (usec_interval >= 1000) |
1772 | mdelay(usec_interval / 1000); | 1776 | msleep(usec_interval / 1000); |
1773 | else | 1777 | else |
1774 | udelay(usec_interval); | 1778 | udelay(usec_interval); |
1775 | } | 1779 | } |