Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11506
Modified Files:
kernel-2.6.spec
Added Files:
linux-2.6-netdev-e1000-disable-alpm.patch
Log Message:
* Fri Nov 30 2007 Chuck Ebbert <cebbert(a)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
---
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-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3392
retrieving revision 1.3393
diff -u -r1.3392 -r1.3393
--- kernel-2.6.spec 29 Nov 2007 00:17:36 -0000 1.3392
+++ kernel-2.6.spec 30 Nov 2007 22:39:17 -0000 1.3393
@@ -616,6 +616,7 @@
Patch717: linux-2.6-netdev-e1000e-08.patch
Patch718: linux-2.6-netdev-e1000e-09.patch
Patch719: linux-2.6-netdev-e1000e-10.patch
+Patch721: linux-2.6-netdev-e1000-disable-alpm.patch
Patch730: linux-2.6-net-e100-disable-polling.patch
Patch740: linux-2.6-snd-ad1988-fix-spdif-output.patch
@@ -1308,6 +1309,8 @@
ApplyPatch linux-2.6-netdev-e1000e-08.patch
ApplyPatch linux-2.6-netdev-e1000e-09.patch
ApplyPatch linux-2.6-netdev-e1000e-10.patch
+# disable link power savings, should fix bad eeprom checksum too
+ApplyPatch linux-2.6-netdev-e1000-disable-alpm.patch
# fix e100 crash on init
ApplyPatch linux-2.6-net-e100-disable-polling.patch
@@ -2268,6 +2271,9 @@
%endif
%changelog
+* Fri Nov 30 2007 Chuck Ebbert <cebbert(a)redhat.com>
+- Disable e1000 link power management
+
* Wed Nov 28 2007 Chuck Ebbert <cebbert(a)redhat.com>
- Fix further bugs in init of Huawei USB modem
- Fix libata handling of IO ready test