From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Thomas Gleixner <tglx@linutronix.de>,
Tushar Dave <tushar.n.dave@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 03/13] e1000: convert mdelay to msleep
Date: Fri, 7 Oct 2011 00:18:36 -0700 [thread overview]
Message-ID: <1317971926-23145-5-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1317971926-23145-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
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>
---
drivers/net/ethernet/intel/e1000/e1000_hw.c | 22 +++++++++++-----------
drivers/net/ethernet/intel/e1000/e1000_main.c | 2 +-
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 a5a89ec..36ee76b 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)
if (ret_val)
return ret_val;
- mdelay(20);
+ msleep(20);
ret_val = e1000_write_phy_reg(hw, 0x0000,
IGP01E1000_IEEE_FORCE_GIGA);
@@ -5413,7 +5413,7 @@ static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, bool link_up)
if (ret_val)
return ret_val;
- mdelay(20);
+ msleep(20);
/* Now enable the transmitter */
ret_val =
@@ -5440,7 +5440,7 @@ static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, bool link_up)
if (ret_val)
return ret_val;
- mdelay(20);
+ msleep(20);
ret_val = e1000_write_phy_reg(hw, 0x0000,
IGP01E1000_IEEE_FORCE_GIGA);
@@ -5457,7 +5457,7 @@ static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, bool link_up)
if (ret_val)
return ret_val;
- mdelay(20);
+ msleep(20);
/* Now enable the transmitter */
ret_val =
@@ -5750,26 +5750,26 @@ static s32 e1000_polarity_reversal_workaround(struct e1000_hw *hw)
if ((mii_status_reg & ~MII_SR_LINK_STATUS) == 0)
break;
- mdelay(100);
+ msleep(100);
}
/* Recommended delay time after link has been lost */
- mdelay(1000);
+ msleep(1000);
/* Now we will re-enable th transmitter on the PHY */
ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0019);
if (ret_val)
return ret_val;
- mdelay(50);
+ msleep(50);
ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFFF0);
if (ret_val)
return ret_val;
- mdelay(50);
+ msleep(50);
ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFF00);
if (ret_val)
return ret_val;
- mdelay(50);
+ msleep(50);
ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0x0000);
if (ret_val)
return ret_val;
@@ -5794,7 +5794,7 @@ static s32 e1000_polarity_reversal_workaround(struct e1000_hw *hw)
if (mii_status_reg & MII_SR_LINK_STATUS)
break;
- mdelay(100);
+ msleep(100);
}
return E1000_SUCCESS;
}
@@ -5825,6 +5825,6 @@ static s32 e1000_get_auto_rd_done(struct e1000_hw *hw)
static s32 e1000_get_phy_cfg_done(struct e1000_hw *hw)
{
e_dbg("e1000_get_phy_cfg_done");
- mdelay(10);
+ msleep(10);
return E1000_SUCCESS;
}
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index a0c5ea0..6d03d76 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)
e1000_read_phy_reg(hw, PHY_CTRL, &mii_reg);
mii_reg |= MII_CR_POWER_DOWN;
e1000_write_phy_reg(hw, PHY_CTRL, mii_reg);
- mdelay(1);
+ msleep(1);
}
out:
return;
--
1.7.6.4
next prev parent reply other threads:[~2011-10-07 7:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-07 7:18 [net-next 00/13][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2011-10-07 7:18 ` [net-next] cs89x0: Move the driver into the Cirrus dir Jeff Kirsher
2011-10-07 7:21 ` Jeff Kirsher
2011-10-07 16:39 ` David Miller
2011-10-07 16:42 ` David Miller
2011-10-07 7:18 ` [net-next 01/13] ixgbe: bump version number Jeff Kirsher
2011-10-07 7:18 ` [net-next 02/13] e1000: convert hardware management from timers to threads Jeff Kirsher
2011-10-07 7:18 ` Jeff Kirsher [this message]
2011-10-07 7:18 ` [net-next 04/13] e1000: convert to private mutex from rtnl Jeff Kirsher
2011-10-07 7:18 ` [net-next 05/13] e1000e: bad short packets received when jumbos enabled on 82579 Jeff Kirsher
2011-10-07 7:18 ` [net-next 06/13] igb: Make Tx budget for NAPI user adjustable Jeff Kirsher
2011-10-07 7:18 ` [net-next 07/13] igb: split buffer_info into tx_buffer_info and rx_buffer_info Jeff Kirsher
2011-10-07 7:18 ` [net-next 08/13] igb: Consolidate creation of Tx context descriptors into a single function Jeff Kirsher
2011-10-07 7:18 ` [net-next 09/13] igb: Make first and tx_buffer_info->next_to_watch into pointers Jeff Kirsher
2011-10-07 7:18 ` [net-next 10/13] igb: Create separate functions for generating cmd_type and olinfo Jeff Kirsher
2011-10-07 7:18 ` [net-next 11/13] igb: Cleanup protocol handling in transmit path Jeff Kirsher
2011-10-07 7:18 ` [net-next 12/13] igb: Combine all flag info fields into a single tx_flags structure Jeff Kirsher
2011-10-07 7:18 ` [net-next 13/13] igb: consolidate creation of Tx buffer info and data descriptor Jeff Kirsher
2011-10-07 16:38 ` [net-next 00/13][pull request] Intel Wired LAN Driver Updates David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317971926-23145-5-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.com \
--cc=tglx@linutronix.de \
--cc=tushar.n.dave@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).