From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Bruce Allan <bruce.w.allan@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 05/15] e1000e: 82577: workaround for link drop issue
Date: Wed, 16 Jan 2013 01:10:17 -0800 [thread overview]
Message-ID: <1358327427-3146-6-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1358327427-3146-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Bruce Allan <bruce.w.allan@intel.com>
When connected to certain switches, the 82577 PHY might drop link
unexpectedly. Work around the issue by setting the Mean Square Error
higher than the hardware default.
Signed-off-by: Bruce Allan <bruce.w.allan@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/e1000e/ich8lan.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index 8004d71..a7d6c87 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -157,7 +157,8 @@
#define I82579_EMI_ADDR 0x10
#define I82579_EMI_DATA 0x11
#define I82579_LPI_UPDATE_TIMER 0x4805 /* in 40ns units + 40 ns base value */
-#define I82579_MSE_THRESHOLD 0x084F /* Mean Square Error Threshold */
+#define I82579_MSE_THRESHOLD 0x084F /* 82579 Mean Square Error Threshold */
+#define I82577_MSE_THRESHOLD 0x0887 /* 82577 Mean Square Error Threshold */
#define I82579_MSE_LINK_DOWN 0x2411 /* MSE count before dropping link */
#define I217_EEE_ADVERTISEMENT 0x8001 /* IEEE MMD Register 7.60 */
#define I217_EEE_LP_ABILITY 0x8002 /* IEEE MMD Register 7.61 */
@@ -1809,6 +1810,11 @@ static s32 e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw)
if (ret_val)
goto release;
ret_val = e1e_wphy_locked(hw, BM_PORT_GEN_CFG, phy_data & 0x00FF);
+ if (ret_val)
+ goto release;
+
+ /* set MSE higher to enable link to stay up when noise is high */
+ ret_val = e1000_write_emi_reg_locked(hw, I82577_MSE_THRESHOLD, 0x0034);
release:
hw->phy.ops.release(hw);
--
1.7.11.7
next prev parent reply other threads:[~2013-01-16 9:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-16 9:10 [net-nexti v2 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-01-16 9:10 ` [net-next 01/15] e1000e: SerDes autoneg flow control Jeff Kirsher
2013-01-16 9:10 ` [net-next 02/15] e1000e: Acquire/release semaphore when writing each EEPROM page Jeff Kirsher
2013-01-16 9:10 ` [net-next 03/15] e1000e: Invalid Image CSUM bit changed for I217 Jeff Kirsher
2013-01-16 9:10 ` [net-next 04/15] e1000e: helper functions for accessing EMI registers Jeff Kirsher
2013-01-16 9:10 ` Jeff Kirsher [this message]
2013-01-16 9:10 ` [net-next 06/15] e1000e: fix enabling of EEE on 82579 and I217 Jeff Kirsher
2013-01-16 9:10 ` [net-next 07/15] e1000e: unexpected "Reset adapter" message when cable pulled Jeff Kirsher
2013-01-16 9:10 ` [net-next 08/15] e1000e: add missing bailout on error Jeff Kirsher
2013-01-16 9:10 ` [net-next v2 09/15] e1000e: resolve checkpatch PREFER_PR_LEVEL warning Jeff Kirsher
2013-01-16 9:10 ` [net-next 10/15] e1000e: cleanup redundant statistics counter Jeff Kirsher
2013-01-16 9:10 ` [net-next 11/15] e1000e: cleanup unusual comment placement Jeff Kirsher
2013-01-16 9:10 ` [net-next 12/15] e1000e: cleanup unnecessary line wrap Jeff Kirsher
2013-01-16 9:10 ` [net-next 13/15] e1000e: cleanup magic number Jeff Kirsher
2013-01-16 9:10 ` [net-next 14/15] e1000e: cleanup code duplication Jeff Kirsher
2013-01-16 9:10 ` [net-next 15/15] e1000e: merge multiple conditional statements into one Jeff Kirsher
2013-01-16 19:32 ` [net-nexti v2 00/15][pull request] Intel Wired LAN Driver Updates David Miller
-- strict thread matches above, loose matches on Subject: below --
2013-01-11 10:23 [net-next " Jeff Kirsher
2013-01-11 10:23 ` [net-next 05/15] e1000e: 82577: workaround for link drop issue Jeff Kirsher
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=1358327427-3146-6-git-send-email-jeffrey.t.kirsher@intel.com \
--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 \
--cc=sassmann@redhat.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).