diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2011-03-19 00:27:20 +0000 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-04-13 19:17:06 -0700 |
commit | 1bba4386ab4f67a53c9649268dd9c83bc6110a9b (patch) | |
tree | 5519c317c5f2828422c7cb44fa6251bae5b5aff9 /drivers/net/e1000e/es2lan.c | |
parent | 563988dcfe706457ec7049d59e18d6147179bb0a (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/es2lan.c')
-rw-r--r-- | drivers/net/e1000e/es2lan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/e1000e/es2lan.c b/drivers/net/e1000e/es2lan.c index 2fefa820302..0279695b694 100644 --- a/drivers/net/e1000e/es2lan.c +++ b/drivers/net/e1000e/es2lan.c @@ -612,7 +612,7 @@ static s32 e1000_get_cfg_done_80003es2lan(struct e1000_hw *hw) while (timeout) { if (er32(EEMNGCTL) & mask) break; - msleep(1); + usleep_range(1000, 2000); timeout--; } if (!timeout) { @@ -802,7 +802,7 @@ static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw) ew32(TCTL, E1000_TCTL_PSP); e1e_flush(); - msleep(10); + usleep_range(10000, 20000); ctrl = er32(CTRL); |