From: Bruce Allan Date: Tue, 19 Mar 2013 01:47:12 +0000 (+0000) Subject: e1000e: fix scheduling while atomic bugs X-Git-Tag: v3.10-rc1~66^2~288^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=274a85e095b8265c3b759a60f8c52b9993d89d3b;p=profile%2Fcommon%2Fkernel-common.git 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 Tested-by: Jeff Pieper Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/e1000e/phy.c b/drivers/net/ethernet/intel/e1000e/phy.c index cbb310f..59c76a6 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) * the lower time out */ for (i = 0; i < (E1000_GEN_POLL_TIMEOUT * 3); i++) { - usleep_range(50, 100); + udelay(50); mdic = er32(MDIC); if (mdic & E1000_MDIC_READY) break; @@ -190,7 +190,7 @@ s32 e1000e_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data) * reading duplicate data in the next MDIC transaction. */ if (hw->mac.type == e1000_pch2lan) - usleep_range(100, 200); + udelay(100); return 0; } @@ -229,7 +229,7 @@ s32 e1000e_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data) * the lower time out */ for (i = 0; i < (E1000_GEN_POLL_TIMEOUT * 3); i++) { - usleep_range(50, 100); + udelay(50); mdic = er32(MDIC); if (mdic & E1000_MDIC_READY) break; @@ -253,7 +253,7 @@ s32 e1000e_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data) * reading duplicate data in the next MDIC transaction. */ if (hw->mac.type == e1000_pch2lan) - usleep_range(100, 200); + udelay(100); return 0; }