rpms/kernel/F-8 linux-2.6-netdev-e1000-disable-alpm.patch, NONE, 1.1 kernel.spec, 1.283, 1.284

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Fri Nov 30 22:33:46 UTC 2007


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11301

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-netdev-e1000-disable-alpm.patch 
Log Message:
* Fri Nov 30 2007 Chuck Ebbert <cebbert at redhat.com>
- disable e1000 link power savings, fixing several bugs


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
---
 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,8 @@ e1000_probe(struct pci_dev *pdev,
 	int i, err, pci_using_dac;
 	uint16_t eeprom_data = 0;
 	uint16_t eeprom_apme_mask = E1000_EEPROM_APME;
+
+	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/F-8/kernel.spec,v
retrieving revision 1.283
retrieving revision 1.284
diff -u -r1.283 -r1.284
--- kernel.spec	30 Nov 2007 17:19:10 -0000	1.283
+++ kernel.spec	30 Nov 2007 22:33:11 -0000	1.284
@@ -691,6 +691,7 @@
 Patch718: linux-2.6-netdev-e1000e-09.patch
 Patch719: linux-2.6-netdev-e1000e-10.patch
 Patch720: linux-2.6-e1000-bad-csum-allow.patch
+Patch721: linux-2.6-netdev-e1000-disable-alpm.patch
 Patch730: linux-2.6-netdev-spidernet-fix-interrupt-handling.patch
 #Patch780: linux-2.6-clockevents-fix-resume-logic.patch
 Patch750: linux-2.6-acpi-git-ec-init-fixes.patch
@@ -1298,6 +1299,8 @@
 
 # Workaround for flaky e1000 EEPROMs
 ApplyPatch linux-2.6-e1000-bad-csum-allow.patch
+# disable link power savings, should fix bad eeprom checksum too
+ApplyPatch linux-2.6-netdev-e1000-disable-alpm.patch
 # spidernet: fix interrupt handling
 ApplyPatch linux-2.6-netdev-spidernet-fix-interrupt-handling.patch
 
@@ -1975,6 +1978,9 @@
 
 
 %changelog
+* Fri Nov 30 2007 Chuck Ebbert <cebbert at redhat.com>
+- Disable e1000 link power management (#400561)
+
 * Fri Nov 30 2007 Jarod Wilson <jwilson at redhat.com>
 - Improved FireWire OHCI 1.0 Isochronous Receive support (#344851)
 




More information about the fedora-extras-commits mailing list