netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-2.6 PATCH 1/6] e1000e: PHY loopback broken on 82578
@ 2009-07-01 23:27 Jeff Kirsher
  2009-07-01 23:27 ` [net-2.6 PATCH 2/6] e1000e: delay after LCD reset and proper checks for PHY configuration done Jeff Kirsher
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Jeff Kirsher @ 2009-07-01 23:27 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Bruce Allan, Jeff Kirsher

From: Bruce Allan <bruce.w.allan@intel.com>

PHY loopback on 82578 fails to work as a result of flushing the packets
in the FIFO buffer in the link stall workaround.  Don't perform the
workaround if in PHY loopback mode.


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

 drivers/net/e1000e/defines.h |    2 ++
 drivers/net/e1000e/phy.c     |    5 +++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/e1000e/defines.h b/drivers/net/e1000e/defines.h
index 8890c97..4329ec3 100644
--- a/drivers/net/e1000e/defines.h
+++ b/drivers/net/e1000e/defines.h
@@ -575,6 +575,8 @@
 #define PHY_1000T_STATUS 0x0A /* 1000Base-T Status Reg */
 #define PHY_EXT_STATUS   0x0F /* Extended Status Reg */
 
+#define PHY_CONTROL_LB   0x4000 /* PHY Loopback bit */
+
 /* NVM Control */
 #define E1000_EECD_SK        0x00000001 /* NVM Clock */
 #define E1000_EECD_CS        0x00000002 /* NVM Chip Select */
diff --git a/drivers/net/e1000e/phy.c b/drivers/net/e1000e/phy.c
index e23459c..d845394 100644
--- a/drivers/net/e1000e/phy.c
+++ b/drivers/net/e1000e/phy.c
@@ -2737,6 +2737,11 @@ s32 e1000_link_stall_workaround_hv(struct e1000_hw *hw)
 	if (hw->phy.type != e1000_phy_82578)
 		goto out;
 
+	/* Do not apply workaround if in PHY loopback bit 14 set */
+	hw->phy.ops.read_phy_reg(hw, PHY_CONTROL, &data);
+	if (data & PHY_CONTROL_LB)
+		goto out;
+
 	/* check if link is up and at 1Gbps */
 	ret_val = hw->phy.ops.read_phy_reg(hw, BM_CS_STATUS, &data);
 	if (ret_val)


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-07-04  3:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-01 23:27 [net-2.6 PATCH 1/6] e1000e: PHY loopback broken on 82578 Jeff Kirsher
2009-07-01 23:27 ` [net-2.6 PATCH 2/6] e1000e: delay after LCD reset and proper checks for PHY configuration done Jeff Kirsher
2009-07-01 23:28 ` [net-2.6 PATCH 3/6] e1000e: do not write SmartSpeed register bits on parts without support Jeff Kirsher
2009-07-01 23:28 ` [net-2.6 PATCH 4/6] e1000e: prevent NVM corruption on sectors larger than 4K Jeff Kirsher
2009-07-01 23:28 ` [net-2.6 PATCH 5/6] e1000e: delay second read of PHY_STATUS register on failure of first read Jeff Kirsher
2009-07-01 23:29 ` [net-2.6 PATCH 6/6] e1000e: disable K1 at 1000Mbps for 82577/82578 Jeff Kirsher
2009-07-04  3:14 ` [net-2.6 PATCH 1/6] e1000e: PHY loopback broken on 82578 David Miller

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).