aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/e1000
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2011-10-05 03:24:46 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-10-07 01:40:05 -0400
commit4e0d8f7d97f9150bdd07f6355e5c1486967dce79 (patch)
treeeb298948681e21ada20a3ecdd6e06038584bf8db /drivers/net/ethernet/intel/e1000
parenta4010afef585b7142eb605e3a6e4210c0e1b2957 (diff)
e1000: convert mdelay to msleep
With the previous commit, there are several functions that are only ever called from thread context, and are able to sleep with msleep instead of mdelay. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> CC: Thomas Gleixner <tglx@linutronix.de> CC: Tushar Dave <tushar.n.dave@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/ethernet/intel/e1000')
-rw-r--r--drivers/net/ethernet/intel/e1000/e1000_hw.c22
-rw-r--r--drivers/net/ethernet/intel/e1000/e1000_main.c2
2 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.c b/drivers/net/ethernet/intel/e1000/e1000_hw.c
index a5a89ecb6f36..36ee76bf4cba 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_hw.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_hw.c
@@ -5385,7 +5385,7 @@ static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, bool link_up)
5385 if (ret_val) 5385 if (ret_val)
5386 return ret_val; 5386 return ret_val;
5387 5387
5388 mdelay(20); 5388 msleep(20);
5389 5389
5390 ret_val = e1000_write_phy_reg(hw, 0x0000, 5390 ret_val = e1000_write_phy_reg(hw, 0x0000,
5391 IGP01E1000_IEEE_FORCE_GIGA); 5391 IGP01E1000_IEEE_FORCE_GIGA);
@@ -5413,7 +5413,7 @@ static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, bool link_up)
5413 if (ret_val) 5413 if (ret_val)
5414 return ret_val; 5414 return ret_val;
5415 5415
5416 mdelay(20); 5416 msleep(20);
5417 5417
5418 /* Now enable the transmitter */ 5418 /* Now enable the transmitter */
5419 ret_val = 5419 ret_val =
@@ -5440,7 +5440,7 @@ static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, bool link_up)
5440 if (ret_val) 5440 if (ret_val)
5441 return ret_val; 5441 return ret_val;
5442 5442
5443 mdelay(20); 5443 msleep(20);
5444 5444
5445 ret_val = e1000_write_phy_reg(hw, 0x0000, 5445 ret_val = e1000_write_phy_reg(hw, 0x0000,
5446 IGP01E1000_IEEE_FORCE_GIGA); 5446 IGP01E1000_IEEE_FORCE_GIGA);
@@ -5457,7 +5457,7 @@ static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, bool link_up)
5457 if (ret_val) 5457 if (ret_val)
5458 return ret_val; 5458 return ret_val;
5459 5459
5460 mdelay(20); 5460 msleep(20);
5461 5461
5462 /* Now enable the transmitter */ 5462 /* Now enable the transmitter */
5463 ret_val = 5463 ret_val =
@@ -5750,26 +5750,26 @@ static s32 e1000_polarity_reversal_workaround(struct e1000_hw *hw)
5750 5750
5751 if ((mii_status_reg & ~MII_SR_LINK_STATUS) == 0) 5751 if ((mii_status_reg & ~MII_SR_LINK_STATUS) == 0)
5752 break; 5752 break;
5753 mdelay(100); 5753 msleep(100);
5754 } 5754 }
5755 5755
5756 /* Recommended delay time after link has been lost */ 5756 /* Recommended delay time after link has been lost */
5757 mdelay(1000); 5757 msleep(1000);
5758 5758
5759 /* Now we will re-enable th transmitter on the PHY */ 5759 /* Now we will re-enable th transmitter on the PHY */
5760 5760
5761 ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0019); 5761 ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0019);
5762 if (ret_val) 5762 if (ret_val)
5763 return ret_val; 5763 return ret_val;
5764 mdelay(50); 5764 msleep(50);
5765 ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFFF0); 5765 ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFFF0);
5766 if (ret_val) 5766 if (ret_val)
5767 return ret_val; 5767 return ret_val;
5768 mdelay(50); 5768 msleep(50);
5769 ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFF00); 5769 ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFF00);
5770 if (ret_val) 5770 if (ret_val)
5771 return ret_val; 5771 return ret_val;
5772 mdelay(50); 5772 msleep(50);
5773 ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0x0000); 5773 ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0x0000);
5774 if (ret_val) 5774 if (ret_val)
5775 return ret_val; 5775 return ret_val;
@@ -5794,7 +5794,7 @@ static s32 e1000_polarity_reversal_workaround(struct e1000_hw *hw)
5794 5794
5795 if (mii_status_reg & MII_SR_LINK_STATUS) 5795 if (mii_status_reg & MII_SR_LINK_STATUS)
5796 break; 5796 break;
5797 mdelay(100); 5797 msleep(100);
5798 } 5798 }
5799 return E1000_SUCCESS; 5799 return E1000_SUCCESS;
5800} 5800}
@@ -5825,6 +5825,6 @@ static s32 e1000_get_auto_rd_done(struct e1000_hw *hw)
5825static s32 e1000_get_phy_cfg_done(struct e1000_hw *hw) 5825static s32 e1000_get_phy_cfg_done(struct e1000_hw *hw)
5826{ 5826{
5827 e_dbg("e1000_get_phy_cfg_done"); 5827 e_dbg("e1000_get_phy_cfg_done");
5828 mdelay(10); 5828 msleep(10);
5829 return E1000_SUCCESS; 5829 return E1000_SUCCESS;
5830} 5830}
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index a0c5ea0d3fd5..6d03d7672699 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -485,7 +485,7 @@ static void e1000_power_down_phy(struct e1000_adapter *adapter)
485 e1000_read_phy_reg(hw, PHY_CTRL, &mii_reg); 485 e1000_read_phy_reg(hw, PHY_CTRL, &mii_reg);
486 mii_reg |= MII_CR_POWER_DOWN; 486 mii_reg |= MII_CR_POWER_DOWN;
487 e1000_write_phy_reg(hw, PHY_CTRL, mii_reg); 487 e1000_write_phy_reg(hw, PHY_CTRL, mii_reg);
488 mdelay(1); 488 msleep(1);
489 } 489 }
490out: 490out:
491 return; 491 return;