Patchwork [NET-NEXT,02/14] e1000e: commit speed/duplex changes for m88 PHY

login
register
mail settings
Submitter Jeff Kirsher
Date Nov. 21, 2008, 6:59 p.m.
Message ID <20081121185922.32313.24916.stgit@gitlost.lost>
Download mbox | patch
Permalink /patch/10081/
State Accepted
Delegated to: David Miller
Headers show

Comments

Jeff Kirsher - Nov. 21, 2008, 6:59 p.m.
From: Bruce Allan <bruce.w.allan@intel.com>

Follow the convention used elsewhere in e1000e to 'commit' PHY changes
instead of directly writing to the PHY CTRL register to reset it.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/e1000e/phy.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Nov. 22, 2008, 12:50 a.m.
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 21 Nov 2008 10:59:22 -0800

> From: Bruce Allan <bruce.w.allan@intel.com>
> 
> Follow the convention used elsewhere in e1000e to 'commit' PHY changes
> instead of directly writing to the PHY CTRL register to reset it.
> 
> Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/e1000e/phy.c b/drivers/net/e1000e/phy.c
index 6cd333a..cb7d71e 100644
--- a/drivers/net/e1000e/phy.c
+++ b/drivers/net/e1000e/phy.c
@@ -1030,14 +1030,14 @@  s32 e1000e_phy_force_speed_duplex_m88(struct e1000_hw *hw)
 
 	e1000e_phy_force_speed_duplex_setup(hw, &phy_data);
 
-	/* Reset the phy to commit changes. */
-	phy_data |= MII_CR_RESET;
-
 	ret_val = e1e_wphy(hw, PHY_CONTROL, phy_data);
 	if (ret_val)
 		return ret_val;
 
-	udelay(1);
+	/* Reset the phy to commit changes. */
+	ret_val = e1000e_commit_phy(hw);
+	if (ret_val)
+		return ret_val;
 
 	if (phy->autoneg_wait_to_complete) {
 		hw_dbg(hw, "Waiting for forced speed/duplex link on M88 phy.\n");