diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2013-03-18 21:47:12 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-03-28 03:56:48 -0400 |
commit | 274a85e095b8265c3b759a60f8c52b9993d89d3b (patch) | |
tree | c00703877f166fa0120e91c32d51dd665a410dd5 | |
parent | 8defe71382b27a6e416854b02d42b20d904b3839 (diff) |
e1000e: fix scheduling while atomic bugs
The previous commit ce43a2168c59bc47b5f0c1825fd5f9a2a9e3b447 (e1000e:
cleanup USLEEP_RANGE checkpatch checks) converted a number of delays and
sleeps as recommended in ./Documentation/timers/timers-howto.txt.
Unfortunately, a few of the udelay() to usleep_range() conversions are in
code paths that are in an atomic context in which usleep_range() should
not be used. Revert those specific changes.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/phy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/phy.c b/drivers/net/ethernet/intel/e1000e/phy.c index cbb310fb7d9f..59c76a6815a0 100644 --- a/drivers/net/ethernet/intel/e1000e/phy.c +++ b/drivers/net/ethernet/intel/e1000e/phy.c | |||
@@ -165,7 +165,7 @@ s32 e1000e_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data) | |||
165 | * the lower time out | 165 | * the lower time out |
166 | */ | 166 | */ |
167 | for (i = 0; i < (E1000_GEN_POLL_TIMEOUT * 3); i++) { | 167 | for (i = 0; i < (E1000_GEN_POLL_TIMEOUT * 3); i++) { |
168 | usleep_range(50, 100); | 168 | udelay(50); |
169 | mdic = er32(MDIC); | 169 | mdic = er32(MDIC); |
170 | if (mdic & E1000_MDIC_READY) | 170 | if (mdic & E1000_MDIC_READY) |
171 | break; | 171 | break; |
@@ -190,7 +190,7 @@ s32 e1000e_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data) | |||
190 | * reading duplicate data in the next MDIC transaction. | 190 | * reading duplicate data in the next MDIC transaction. |
191 | */ | 191 | */ |
192 | if (hw->mac.type == e1000_pch2lan) | 192 | if (hw->mac.type == e1000_pch2lan) |
193 | usleep_range(100, 200); | 193 | udelay(100); |
194 | 194 | ||
195 | return 0; | 195 | return 0; |
196 | } | 196 | } |
@@ -229,7 +229,7 @@ s32 e1000e_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data) | |||
229 | * the lower time out | 229 | * the lower time out |
230 | */ | 230 | */ |
231 | for (i = 0; i < (E1000_GEN_POLL_TIMEOUT * 3); i++) { | 231 | for (i = 0; i < (E1000_GEN_POLL_TIMEOUT * 3); i++) { |
232 | usleep_range(50, 100); | 232 | udelay(50); |
233 | mdic = er32(MDIC); | 233 | mdic = er32(MDIC); |
234 | if (mdic & E1000_MDIC_READY) | 234 | if (mdic & E1000_MDIC_READY) |
235 | break; | 235 | break; |
@@ -253,7 +253,7 @@ s32 e1000e_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data) | |||
253 | * reading duplicate data in the next MDIC transaction. | 253 | * reading duplicate data in the next MDIC transaction. |
254 | */ | 254 | */ |
255 | if (hw->mac.type == e1000_pch2lan) | 255 | if (hw->mac.type == e1000_pch2lan) |
256 | usleep_range(100, 200); | 256 | udelay(100); |
257 | 257 | ||
258 | return 0; | 258 | return 0; |
259 | } | 259 | } |