rpms/kernel/devel linux-2.6-netdev-e1000-disable-alpm.patch, NONE, 1.1 kernel.spec, 1.298, 1.299

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Wed Dec 12 20:55:29 UTC 2007


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7400

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-netdev-e1000-disable-alpm.patch 
Log Message:
* Wed Dec 12 2007 Chuck Ebbert <cebbert at redhat.com>
- Disable e1000 link power management.


linux-2.6-netdev-e1000-disable-alpm.patch:

--- NEW FILE linux-2.6-netdev-e1000-disable-alpm.patch ---
Port of f2fa3114919fa195f800a04a5e57156c0f67fff4 (from the netdev tree)
from e1000e to e1000.

Should fix the checksum problems too.

bz #400561 (F8)
---
 drivers/net/e1000/e1000_main.c |   31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

--- linux-2.6.23.noarch.orig/drivers/net/e1000/e1000_main.c
+++ linux-2.6.23.noarch/drivers/net/e1000/e1000_main.c
@@ -846,6 +846,33 @@ e1000_reset(struct e1000_adapter *adapte
 	e1000_release_manageability(adapter);
 }
 
+static void e1000e_disable_l1aspm(struct pci_dev *pdev)
+{
+	int pos;
+	u32 cap;
+	u16 val;
+
+	/*
+	 * 82573 workaround - disable L1 ASPM on mobile chipsets
+	 *
+	 * L1 ASPM on various mobile (ich7) chipsets do not behave properly
+	 * resulting in lost data or garbage information on the pci-e link
+	 * level. This could result in (false) bad EEPROM checksum errors,
+	 * long ping times (up to 2s) or even a system freeze/hang.
+	 *
+	 * Unfortunately this feature saves about 1W power consumption when
+	 * active.
+	 */
+	pos = pci_find_capability(pdev, PCI_CAP_ID_EXP);
+	pci_read_config_dword(pdev, pos + PCI_EXP_LNKCAP, &cap);
+	pci_read_config_word(pdev, pos + PCI_EXP_LNKCTL, &val);
+	if (val & 0x2) {
+		dev_warn(&pdev->dev, "Disabling L1 ASPM\n");
+		val &= ~0x2;
+		pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, val);
+	}
+}
+
 /**
  * e1000_probe - Device Initialization Routine
  * @pdev: PCI device information struct
@@ -872,6 +899,7 @@ e1000_probe(struct pci_dev *pdev,
 	uint16_t eeprom_apme_mask = E1000_EEPROM_APME;
 	DECLARE_MAC_BUF(mac);
 
+	e1000e_disable_l1aspm(pdev);
 	if ((err = pci_enable_device(pdev)))
 		return err;
 
@@ -5180,6 +5209,7 @@ e1000_resume(struct pci_dev *pdev)
 
 	pci_set_power_state(pdev, PCI_D0);
 	pci_restore_state(pdev);
+	e1000e_disable_l1aspm(pdev);
 	if ((err = pci_enable_device(pdev))) {
 		printk(KERN_ERR "e1000: Cannot enable PCI device from suspend\n");
 		return err;
@@ -5276,6 +5306,7 @@ static pci_ers_result_t e1000_io_slot_re
 	struct net_device *netdev = pci_get_drvdata(pdev);
 	struct e1000_adapter *adapter = netdev->priv;
 
+	e1000e_disable_l1aspm(pdev);
 	if (pci_enable_device(pdev)) {
 		printk(KERN_ERR "e1000: Cannot re-enable PCI device after reset.\n");
 		return PCI_ERS_RESULT_DISCONNECT;


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.298
retrieving revision 1.299
diff -u -r1.298 -r1.299
--- kernel.spec	12 Dec 2007 20:42:37 -0000	1.298
+++ kernel.spec	12 Dec 2007 20:54:55 -0000	1.299
@@ -649,6 +649,7 @@
 
 # Work around E1000 corrupt EEPROM problem.
 Patch2000: linux-2.6-e1000-corrupt-eeprom-checksum.patch
+Patch2001: linux-2.6-netdev-e1000-disable-alpm.patch
 
 %endif
 
@@ -1164,6 +1165,7 @@
 ApplyPatch linux-2.6-dcdbas-autoload.patch
 
 ApplyPatch linux-2.6-e1000-corrupt-eeprom-checksum.patch
+ApplyPatch linux-2.6-netdev-e1000-disable-alpm.patch
 
 # drm-mm catchup (modesetting, ...)
 ApplyPatch linux-2.6-agp-mm.patch
@@ -1739,6 +1741,9 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
 
 %changelog
+* Wed Dec 12 2007 Chuck Ebbert <cebbert at redhat.com>
+- Disable e1000 link power management.
+
 * Wed Dec 12 2007 Dave Jones <davej at redhat.com>
 - Better version of the e1000 bad eeprom workaround.
 




More information about the fedora-extras-commits mailing list