Problem with e1000: EEPROM Checksum Is Not Valid

From ThinkWiki
Revision as of 04:51, 15 August 2019 by Cheloide (Talk | contribs) (Solutions)
Jump to: navigation, search

Problem Description

On certain ThinkPads, e1000 driver for Intel Gigabit Ethernet (10/100/1000) fails to load with the following error message in /var/log/messages:

e1000: 0000:02:00.0: e1000_probe: The EEPROM Checksum Is Not Valid
e1000: probe of 0000:02:00.0 failed with error -5 

The problem is caused by a power savings feature obstructing normal operation, and causes the first bytes read from the EEPROM to be corrupt, resulting in a random or invalid MAC address (but no other data corruption). The EEPROM checksum test traps the problem and the driver refuses to load.

Solutions

Try to reload the e1000 module until the ethernet is pluged in, and the hardware have a chance to detect a link.

Use e1000e---Kernel Patch

Auke Kok published two patches in October 2007 that help solve both the "corrupted" EEPROM read and bad latency. One of the patches moves many network cards over to the e1000e (e1000 for PCI-Express) module. The second disables some PCIe power management features that were the cause for the bad EEPROM read and some stability issues.

[PATCH 3/4] e1000/e1000e: Move PCI-Express device IDs over to e1000e
[PATCH 2/4] e1000e: Disable L1 ASPM power savings for 82573 mobile variants

Refer to LinuxHQ on how to apply kernel patches.

From Lenovo

Lenovo provides a script that uses 'ethtool' command to update the card's settings. They say it is for SLED 10 but the Linux flavor shouldn't really matter. For some users, neither of the circumventions listed below help, but this script does!

Via module parameter

In recent kernels (at least with 2.6.22, maybe also in 2.6.21) there is a kernel module option to make the module ignore the error.

Load the module like this

modprobe e1000 eeprom_bad_csum_allow=1

You might also apply that parameter via modprobe.d or if you are using Debian/Ubuntu as append-line in your bootloader: e1000.eeprom_bad_csum_allow=1

From Mat's Blog

The fundamental solution is explained at Mat's Blog which directs the reader to Intel's site to download PROBOOT.EXE.

DO NOT USE THIS TOOL ON THINKPADS. The IBAUTIL.EXE tool that it contains is designed only to work with discrete ethernet parts that are on PCI/PCIe cards. It is not at all intended for use with laptop parts, although it is not sufficiently careful to refuse to run on such hardware. Improper use of this tool can leave your LAN firmware corrupted to the point that it will not even enumerate on the PCI bus and you will probably have to have your laptop repaired to restore the LAN functionality. See http://www.mail-archive.com/e1000-devel@lists.sourceforge.net/msg00398.html for an Intel Linux driver employee's comments on this.

Comment:

I used PROBOOT.EXE Version 15.2 (file version 4.0.100.1124) on Bios Version 2.26 (79ETE6WW) for T60 Type 2007-53G with success. The copied instruction is:
“ Download PROBOOT.EXE from Intel. Get the first one from the list - the one without Network adapter, it says only "Intel® Boot Agent PROBOOT.exe version: 11.2", install that - it will create a folder with some files - put these on a bootable floppy (or two) or a bootable CD. Boot to DOS with the floppy or CD and run "IBAUtil.exe -DEFCFG" that will reset the configuration and all should be OK „
I used an old bootable W98 to start the computer and a second CD with the files above. It is only working under DOS!

Using Preboot tool on linux

ATTENTION!
Try at your own risk!

This has been tested on a T60 displaying the error e1000e the nvm checksum is not valid

1. Download Intel® Ethernet Connections Boot Utility, Preboot Images, and EFI Drivers (For Linux)
2. On a Terminal Go to the download directory $ cd /path/to/Preboot.tar.gz
3. Create a folder for the files $ mkdir Preboot
4. untar the file $ tar -xvzf Preboot.tar.gz -C Preboot

if you're running a 32Bit installation of linux, follow this instructions

5. cd to BootUtil folder for your architecture $ cd Preboot/APPS/BootUtil/Linux32/
6. Give execution permissions to bootutil32e $ chmod +x bootutil32
7. Run $ sudo ./bootutil32 -NIC=1 -DEFAULTCONFIG 

if you're running a 64Bit installation of linux, follow this instructions

5. cd to BootUtil folder for your architecture $ cd Preboot/APPS/BootUtil/Linux_x64
6. Give execution permissions to bootutil64e $ chmod +x bootutil64e
7. Run $ sudo ./bootutil64e -NIC=1 -DEFAULTCONFIG 

Source (superuser.com)

Circumvention

  • Upgrade your BIOS

Lenovo has published newer BIOS revisions that appear to fix the issue for some users. The BIOS upgrade turns off "Deep smart power down" which has been known to cause issues at initialization time (the driver can re-enable the issue later if you desire, the feature works correctly then).

  • Insert a cable

Inserting a linked network cable bypasses the problem.

  • Take the checksum twice

This bug report describes a fix -- take the checksum twice. First time will report a bad checksum, second will work (the problem seems to be triggered by some power-saving technology). This requires a tweak to the driver source and a rebuild of your kernel. This is much better than a previous "fix" published here that disabled checksum checking entirely.

I updated the patch above to 2.6.22:

diff -urN linux-2.6.22-suspend2-r1.orig/drivers/net/e1000/e1000_main.c linux-2.6.22-suspend2-r1/drivers/net/e1000/e1000_main.c
--- linux-2.6.22-suspend2-r1.orig/drivers/net/e1000/e1000_main.c        2007-08-17 23:32:04.000000000 +0200
+++ linux-2.6.22-suspend2-r1/drivers/net/e1000/e1000_main.c     2007-09-05 16:39:11.000000000 +0200
@@ -999,16 +999,18 @@
                goto err_eeprom;
        }
 
-       /* before reading the EEPROM, reset the controller to
-        * put the device in a known good starting state */
-
-       e1000_reset_hw(&adapter->hw);
-
-       /* make sure the EEPROM is good */
-
        if (e1000_validate_eeprom_checksum(&adapter->hw) < 0) {
-               DPRINTK(PROBE, ERR, "The EEPROM Checksum Is Not Valid\n");
-               goto err_eeprom;
+               /* before reading the EEPROM, reset the controller to
+                * put the device in a known good starting state */
+               
+               e1000_reset_hw(&adapter->hw);
+
+               /* make sure the EEPROM is good */
+
+               if (e1000_validate_eeprom_checksum(&adapter->hw) < 0) {
+                       DPRINTK(PROBE, ERR, "The EEPROM Checksum Is Not Valid\n");
+                       goto err_eeprom;
+               }
        }
 
        /* copy the MAC address out of the EEPROM */

Ra 15:28, 5 September 2007 (UTC)


  • Remove/add kernel module

Removing and adding the kernel module is a possible work-around. As root, run

# modprobe -r e1000
# modprobe e1000

On some occasions, the commands have to be run twice before eth0 becomes useable. On some X60s this will not work at all.

  • Disabling and re-enabling the NIC in the BIOS

For some it fixed the issue finally, for some it helped just temporarily.

  • Hacking the kernel to carry on even if the checksum is not valid

Although being a very ugly, hack, this works fine for me. To do that, you have to search drivers/net/e1000/e1000_main.c for the line containing the error message and then comment out the following two lines which set the error state and then jump to the error code. Although this doesn't fry the hardware for me, consider yourself warned...

See also