aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/phy.c
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2011-03-18 20:27:20 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-04-13 22:17:06 -0400
commit1bba4386ab4f67a53c9649268dd9c83bc6110a9b (patch)
tree5519c317c5f2828422c7cb44fa6251bae5b5aff9 /drivers/net/e1000e/phy.c
parent563988dcfe706457ec7049d59e18d6147179bb0a (diff)
e1000e: convert short duration msleep() to usleep_range()
With durations less than 20ms, the jiffies or legacy timer backed msleep() may sleep ~20ms which might not be what the caller expects. Instead, it is recommended to use the hrtimers backed usleep_range(). For more, see Documentation/timers/timers-howto.txt. Issues reported by checkpatch. In addition, remove unnecessary sleep in e1000e_write_nvm_spi(). Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/e1000e/phy.c')
-rw-r--r--drivers/net/e1000e/phy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/e1000e/phy.c b/drivers/net/e1000e/phy.c
index 6ae31fcfb629..484774c13c21 100644
--- a/drivers/net/e1000e/phy.c
+++ b/drivers/net/e1000e/phy.c
@@ -2372,7 +2372,7 @@ s32 e1000e_determine_phy_address(struct e1000_hw *hw)
2372 ret_val = 0; 2372 ret_val = 0;
2373 goto out; 2373 goto out;
2374 } 2374 }
2375 msleep(1); 2375 usleep_range(1000, 2000);
2376 i++; 2376 i++;
2377 } while (i < 10); 2377 } while (i < 10);
2378 } 2378 }
@@ -2740,7 +2740,7 @@ void e1000_power_down_phy_copper(struct e1000_hw *hw)
2740 e1e_rphy(hw, PHY_CONTROL, &mii_reg); 2740 e1e_rphy(hw, PHY_CONTROL, &mii_reg);
2741 mii_reg |= MII_CR_POWER_DOWN; 2741 mii_reg |= MII_CR_POWER_DOWN;
2742 e1e_wphy(hw, PHY_CONTROL, mii_reg); 2742 e1e_wphy(hw, PHY_CONTROL, mii_reg);
2743 msleep(1); 2743 usleep_range(1000, 2000);
2744} 2744}
2745 2745
2746/** 2746/**