|
@@ -1757,19 +1757,23 @@ s32 e1000e_phy_has_link_generic(struct e1000_hw *hw, u32 iterations,
|
|
|
* it across the board.
|
|
|
*/
|
|
|
ret_val = e1e_rphy(hw, MII_BMSR, &phy_status);
|
|
|
- if (ret_val)
|
|
|
+ if (ret_val) {
|
|
|
/* If the first read fails, another entity may have
|
|
|
* ownership of the resources, wait and try again to
|
|
|
* see if they have relinquished the resources yet.
|
|
|
*/
|
|
|
- udelay(usec_interval);
|
|
|
+ if (usec_interval >= 1000)
|
|
|
+ msleep(usec_interval / 1000);
|
|
|
+ else
|
|
|
+ udelay(usec_interval);
|
|
|
+ }
|
|
|
ret_val = e1e_rphy(hw, MII_BMSR, &phy_status);
|
|
|
if (ret_val)
|
|
|
break;
|
|
|
if (phy_status & BMSR_LSTATUS)
|
|
|
break;
|
|
|
if (usec_interval >= 1000)
|
|
|
- mdelay(usec_interval / 1000);
|
|
|
+ msleep(usec_interval / 1000);
|
|
|
else
|
|
|
udelay(usec_interval);
|
|
|
}
|