From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, gospo@redhat.com,
Bruce Allan <bruce.w.allan@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-2.6 PATCH 1/6] e1000e: PHY loopback broken on 82578
Date: Wed, 01 Jul 2009 16:27:31 -0700 [thread overview]
Message-ID: <20090701232731.20555.63487.stgit@localhost.localdomain> (raw)
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)
next reply other threads:[~2009-07-01 23:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-01 23:27 Jeff Kirsher [this message]
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
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=20090701232731.20555.63487.stgit@localhost.localdomain \
--to=jeffrey.t.kirsher@intel.com \
--cc=bruce.w.allan@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=netdev@vger.kernel.org \
/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