[kernel/f14/master] Fix failure to get link with e1000e model 82576DC (#652744)

Chuck Ebbert cebbert at fedoraproject.org
Thu Jan 6 13:53:16 UTC 2011


commit b1f2f04a2ba5427cbeb56ae99902198087f7475f
Author: Chuck Ebbert <cebbert at redhat.com>
Date:   Thu Jan 6 08:52:42 2011 -0500

    Fix failure to get link with e1000e model 82576DC (#652744)

 e1000e-82566DC-fails-to-get-link.patch           |   55 +++++++++++++++++
 e1000e-cleanup-e1000_sw_lcd_config_ich8lan.patch |   68 ++++++++++++++++++++++
 kernel.spec                                      |   11 ++++
 3 files changed, 134 insertions(+), 0 deletions(-)
---
diff --git a/e1000e-82566DC-fails-to-get-link.patch b/e1000e-82566DC-fails-to-get-link.patch
new file mode 100644
index 0000000..5a0c1dc
--- /dev/null
+++ b/e1000e-82566DC-fails-to-get-link.patch
@@ -0,0 +1,55 @@
+From: Bruce Allan <bruce.w.allan at intel.com>
+Date: Wed, 22 Sep 2010 17:15:54 +0000 (+0000)
+Subject: e1000e: 82566DC fails to get link
+X-Git-Tag: v2.6.36-rc6~6^2~23
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=5f3eed6fe0e36e4b56c8dd9160241a868ee0de2a
+
+e1000e: 82566DC fails to get link
+
+Two recent patches to cleanup the reset[1] and initial PHY configuration[2]
+code paths for ICH/PCH devices inadvertently left out a 10msec delay and
+device ID check respectively which are necessary for the 82566DC (device id
+0x104b) to be configured properly, otherwise it will not get link.
+
+[1] commit e98cac447cc1cc418dff1d610a5c79c4f2bdec7f
+[2] commit 3f0c16e84438d657d29446f85fe375794a93f159
+
+CC: stable at kernel.org
+Signed-off-by: Bruce Allan <bruce.w.allan at intel.com>
+Tested-by: Jeff Pieper <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+
+diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
+index fc8c3ce..6f9cb0d 100644
+--- a/drivers/net/e1000e/ich8lan.c
++++ b/drivers/net/e1000e/ich8lan.c
+@@ -932,7 +932,6 @@ out:
+  **/
+ static s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw)
+ {
+-	struct e1000_adapter *adapter = hw->adapter;
+ 	struct e1000_phy_info *phy = &hw->phy;
+ 	u32 i, data, cnf_size, cnf_base_addr, sw_cfg_mask;
+ 	s32 ret_val = 0;
+@@ -950,7 +949,8 @@ static s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw)
+ 		if (phy->type != e1000_phy_igp_3)
+ 			return ret_val;
+ 
+-		if (adapter->pdev->device == E1000_DEV_ID_ICH8_IGP_AMT) {
++		if ((hw->adapter->pdev->device == E1000_DEV_ID_ICH8_IGP_AMT) ||
++		    (hw->adapter->pdev->device == E1000_DEV_ID_ICH8_IGP_C)) {
+ 			sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG;
+ 			break;
+ 		}
+@@ -1626,6 +1626,9 @@ static s32 e1000_post_phy_reset_ich8lan(struct e1000_hw *hw)
+ 	if (e1000_check_reset_block(hw))
+ 		goto out;
+ 
++	/* Allow time for h/w to get to quiescent state after reset */
++	msleep(10);
++
+ 	/* Perform any necessary post-reset workarounds */
+ 	switch (hw->mac.type) {
+ 	case e1000_pchlan:
diff --git a/e1000e-cleanup-e1000_sw_lcd_config_ich8lan.patch b/e1000e-cleanup-e1000_sw_lcd_config_ich8lan.patch
new file mode 100644
index 0000000..d56ae5c
--- /dev/null
+++ b/e1000e-cleanup-e1000_sw_lcd_config_ich8lan.patch
@@ -0,0 +1,68 @@
+From: Bruce Allan <bruce.w.allan at intel.com>
+Date: Wed, 16 Jun 2010 13:26:17 +0000 (+0000)
+Subject: e1000e: cleanup e1000_sw_lcd_config_ich8lan()
+X-Git-Tag: v2.6.36-rc1~571^2~529
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=3f0c16e84438d657d29446f85fe375794a93f159
+
+e1000e: cleanup e1000_sw_lcd_config_ich8lan()
+
+Do not acquire and release the PHY unnecessarily for parts that return
+from this workaround without actually accessing the PHY registers.
+
+Signed-off-by: Bruce Allan <bruce.w.allan at intel.com>
+Tested-by: Jeff Pieper <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+
+diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
+index b2507d9..5d8fad3 100644
+--- a/drivers/net/e1000e/ich8lan.c
++++ b/drivers/net/e1000e/ich8lan.c
+@@ -820,14 +820,6 @@ static s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw)
+ 	s32 ret_val = 0;
+ 	u16 word_addr, reg_data, reg_addr, phy_page = 0;
+ 
+-	if (!(hw->mac.type == e1000_ich8lan && phy->type == e1000_phy_igp_3) &&
+-		!(hw->mac.type == e1000_pchlan))
+-		return ret_val;
+-
+-	ret_val = hw->phy.ops.acquire(hw);
+-	if (ret_val)
+-		return ret_val;
+-
+ 	/*
+ 	 * Initialize the PHY from the NVM on ICH platforms.  This
+ 	 * is needed due to an issue where the NVM configuration is
+@@ -835,12 +827,26 @@ static s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw)
+ 	 * Therefore, after each PHY reset, we will load the
+ 	 * configuration data out of the NVM manually.
+ 	 */
+-	if ((adapter->pdev->device == E1000_DEV_ID_ICH8_IGP_M_AMT) ||
+-	    (adapter->pdev->device == E1000_DEV_ID_ICH8_IGP_M) ||
+-	    (hw->mac.type == e1000_pchlan))
++	switch (hw->mac.type) {
++	case e1000_ich8lan:
++		if (phy->type != e1000_phy_igp_3)
++			return ret_val;
++
++		if (adapter->pdev->device == E1000_DEV_ID_ICH8_IGP_AMT) {
++			sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG;
++			break;
++		}
++		/* Fall-thru */
++	case e1000_pchlan:
+ 		sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG_ICH8M;
+-	else
+-		sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG;
++		break;
++	default:
++		return ret_val;
++	}
++
++	ret_val = hw->phy.ops.acquire(hw);
++	if (ret_val)
++		return ret_val;
+ 
+ 	data = er32(FEXTNVM);
+ 	if (!(data & sw_cfg_mask))
diff --git a/kernel.spec b/kernel.spec
index e5f9fd9..ff0c2b4 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -795,6 +795,10 @@ Patch13697: fs-call-security_d_instantiate-in-d_obtain_alias.patch
 
 Patch13698: net-AF_PACKET-vmalloc.patch
 
+# rhbz#652744
+Patch13700: e1000e-cleanup-e1000_sw_lcd_config_ich8lan.patch
+Patch13701: e1000e-82566DC-fails-to-get-link.patch
+
 %endif
 
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1496,6 +1500,10 @@ ApplyPatch orinoco-initialise-priv_hw-before-assigning-the-interrupt.patch
 # rhbz#637619
 ApplyPatch net-AF_PACKET-vmalloc.patch
 
+# rhbz#652744
+ApplyPatch e1000e-cleanup-e1000_sw_lcd_config_ich8lan.patch
+ApplyPatch e1000e-82566DC-fails-to-get-link.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2082,6 +2090,9 @@ fi
 # and build.
 
 %changelog
+* Thu Jan 06 2011 Chuck Ebbert <cebbert at redhat.com>
+- Fix failure to get link with e1000e model 82576DC (#652744)
+
 * Wed Jan 05 2011 Jarod Wilson <jarod at redhat.com> 2.6.35.10-76
 - Restore functional audio on PVR-150 video capture cards (#666456)
 - Fix another mceusb regression cropping up mostly with rc5 signals (#662071)


More information about the scm-commits mailing list