Intel Ethernet Connection I219-V not working under Linux on an ASUSPRO B laptop, e1000e driver reports: "The NVM Checksum Is Not Valid"

41,151

Solution 1

I managed to fix the checksum. Now Ethernet works fine under Linux. I explained the details in my answer to my SuperUser.SE question.

Basically, I first patched e1000e to skip the NVM checksum validation

for (i = 0;; i++) {
    if (e1000_validate_nvm_checksum(&adapter->hw) >= 0)
        break;
    if (i == 2) {
        dev_err(pci_dev_to_dev(pdev),
            "The NVM Checksum Is Not Valid\n");
        err = -EIO;
        goto err_eeprom;
    }
}

in src/netdev.c, and after I had access to the Ethernet chip, I wrote to its NVM with ethtool, which automatically fixed the checksum.

Solution 2

The e1000e driver is the one that can run the I2xx intel Ethernet Controllers. And the latest e1000e driver (as of this writing) is capable of running the I219 chip.

The The NVM Checksum Is Not Valid message during boot is what was preventing the older drivers from being loaded. On other OSes (notably MS windows) that error is ignored. But Linux appears to be stricter.

NVM is a ROM (read only memory) in the chip, which undergoes a checksum, and the older version of the e1000 driver was not aware of the NVM contents of the newer chips. Since the card works on other OSes that ignore the error another possibility could have been to force the driver to ignore the error.

The checksum is performed inside nvm.c, although other several models present their own fix_checksum functions that run before e1000e_validate_nvm_checksum_generic.

s32 e1000e_validate_nvm_checksum_generic(struct e1000_hw *hw)
{
        s32 ret_val;
        u16 checksum = 0;
        u16 i, nvm_data;

        for (i = 0; i < (NVM_CHECKSUM_REG + 1); i++) {
                ret_val = e1000_read_nvm(hw, i, 1, &nvm_data);
                if (ret_val) {
                        e_dbg("NVM Read Error\n");
                        return ret_val;
                }
                checksum += nvm_data;
        }

        if (checksum != (u16)NVM_SUM) {
                e_dbg("NVM Checksum Invalid\n");
                return -E1000_ERR_NVM;
        }

        return 0;
}

NVM_SUM is defined inside define.h

#define NVM_SUM                         0xBABA

If you are confident that the card runs (and only fails because of the NVM checksum) you can try to edit the checksum function to:

s32 e1000e_validate_nvm_checksum_generic(struct e1000_hw *hw)
{
        return 0;
}

And it will force the checksum to be always successful.


Extra (more-or-less) trustworthy references:

Solution 3

Here's a detailed guide Ubuntu 18.04.1 LTS- support for Intel I219-V

  1. Download driver from
    https://downloadcenter.intel.com/download/15817/Intel-Network-Adapter-Driver-for-PCI-E-Gigabit-Network-Connections-under-Linux-?product=71307 (Testet on version 3.4.0.2)

  2. Unpack zip to folder of your choice

  3. Change to the driver src directory,
    e.g. cd e1000e-3.4.2.1/src/

  4. Make sure that any older e1000e drivers are removed from the kernel before loading the new module sudo rmmod e1000e

  5. Compile the driver module: sudo make install

  6. Load the module using the modprobe command: sudo modprobe e1000e The binary will be installed as: /lib/modules//updates/drivers/net/ethernet/intel/e1000e/e1000e.ko

  7. Verify that the interface works. Enter the following, where IP_address is the IP address for another machine on the same subnet as the interface that is being tested: ping

  8. Make the driver persistent sudo dpkg-reconfigure linux-image-$(uname -r)

I think this is what pkt 8 does::.... Note: For certain distributions like (but not limited to) RedHat Enterprise Linux 7 and Ubuntu, once the driver is installed the initrd/initramfs file may need to be updated to prevent the OS loading old versions of the e1000e driver. For Ubuntu: # update-initramfs -u

Share:
41,151

Related videos on Youtube

Kayofeld
Author by

Kayofeld

Updated on September 18, 2022

Comments

  • Kayofeld
    Kayofeld almost 2 years

    I have a problem with an ASUSPRO B8430UA laptop: when I boot it with Ubuntu 16.04 (or NixOS 16.03) the Ethernet port does not work. The driver used is e1000e, it reports:

    $ dmesg | grep e1000e
    [    5.643760] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
    [    5.643761] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
    [    5.644308] e1000e 0000:00:1f.6: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
    [    5.877838] e1000e 0000:00:1f.6: The NVM Checksum Is Not Valid
    [    5.907340] e1000e: probe of 0000:00:1f.6 failed with error -5
    

    Under Windows 7 Ethernet port works fine: I can connect to the Internet. According to Windows, I have Intel(R) Ethernet Connection I219-V.

    I have searched for "official" Linux drivers, but none is listed as supporting I219-V. However, e1000e is listed as supporting I218-V, and I've got a confirmation from e1000-devel mailing list that e1000e should support I219-V. Just in case I tried using the latest version 3.3.4 of e1000e, but the error was the same: "The NVM Checksum Is Not Valid."

    It looks like indeed there is a mismatch of the checksum of the non-volatile memory of I219-V.

    I have tried another ASUS laptop of the same model, and the error was the same, so this does not look like an accidental corruption.

    Neither ASUS nor Intel customer support could suggest any solution.

    I have discovered Intel Ethernet Connections Boot Utility, but according to the documentation (for version 1.6.13.0) it is only intended for PCI, not OEM on-board, Ethernet cards. However, I decided to run it without parameters just to print the list of Intel network ports, and this is what I've got:

    $ sudo ./bootutil64e
    
    Intel(R) Ethernet Flash Firmware Utility
    BootUtil version 1.6.13.0
    Copyright (C) 2003-2016 Intel Corporation
    
    Type BootUtil -? for help
    
    Port Network Address Location Series  WOL Flash Firmware                Version
    ==== =============== ======== ======= === ============================= =======
      1   D017C2201F59     0:31.6 Gigabit N/A FLASH Not Present
    

    I do not quite understand what "FLASH Not Present" means here.

    I posed a question on SuperUser.SE about fixing the NVM checksum. Here I am asking if and how anyone managed to successfully install Linux with working Ethernet on an ASUSPRO B8430UA laptop or on any other laptops with Intel Ethernet Controllers which had "The NVM Checksum Is Not Valid" error.

    • Admin
      Admin almost 8 years
      What more do you know about the ethernet card? Also, the output of lspci will give us some information about what model it is.
    • Admin
      Admin almost 8 years
      @grochmal , i have added details. Thanks for looking into it.
    • Admin
      Admin almost 8 years
      Noticed a message on tty1 under Ubuntu: "The NVM Checksum Is Not Valid". Don't know if this means anything...
    • Admin
      Admin almost 8 years
      It is not that intel actually writes drivers for linux, most intel drivers are written by people not associated to intel. Two things that would be useful to have are: lspci -v just for the Ethernet controller (to not clutter the question) and dmesg | grep -i ethernet to see what the kernel tried.
    • Admin
      Admin almost 8 years
      OK, the kernel is clueless :). I'd try this driver, it is for i210/i211 but there is a good chance it works since it lists i218-v (just one chip version off). I tested its compilation, and it compiled fine even against a kernel 4.x (which it says it does not support)
    • Admin
      Admin almost 8 years
      I posed the question on e1000-devel mailing list and they confirm that the latest version of this driver (3.3.4) should work with i219-v. I wonder if the previous versions still did not support i219-v, or otherwise what it the reason that Ethernet did not work out-of-the-box.
    • Admin
      Admin almost 8 years
      That is actually related to that "The NVM Checksum Is Not Valid" you saw. The ROM (or NVM or whatever those bloody hardware people want to call it) contents when summed together (u16 int by u16 int) did not match 0xbaba. It could indicate a ROM corruption, but in this case it is just that your card has newer ROM contents that what the driver is aware of. I'll add an answer later (i'm a little busy now, sorry) with the excerpt of code from nvm.c that shows the checksum. I guess, MS windows and NixOS ignore the error.
    • Admin
      Admin almost 8 years
      I have considerably rewritten the question including new information from Intel's BootUtil.
  • grochmal
    grochmal almost 8 years
    I have aimed the answer at people who might find the question through the search here, or through google. Still, i believe, that it is explanative about what is happening with the driver.
  • Kayofeld
    Kayofeld almost 8 years
    "The e1000 driver is the one that can run the I2xx intel Ethernet Controllers" -- except I210 and I211, according to this README.
  • grochmal
    grochmal almost 8 years
    @Alexey - Ooops, yeah I have meant e1000e. Sorry for that. Also, if the driver is going to be "fixed" for I219 all that will be added is a fix function akin *_validate_nvm_checksum_ich8lan which updates the data read from the ROM (NVM) before calling the checksum. If the card work on windows and NixOS, I'd just hack the driver to always say that the checksum is correct (effectively ignoring the error).
  • Kayofeld
    Kayofeld almost 8 years
    It does not work on NixOS, same as Ubuntu. Well, i'll return to the Ethernet problem after i manage to set up the rest (dual boot NixOS and Ubuntu).
  • grochmal
    grochmal almost 8 years
    @Alexey - I googled what NixOS is (yes, I did not know what it is), and now i know that i misunderstood your question when you said that you booted NixOS. NixOS uses a Linux kernel so it will fall in the exact same problem. I added two funny references which are also the result of my recent googling. The baffling one is the RedHat bugfix in which they simply comment the error code out (comment #12).
  • Kayofeld
    Kayofeld almost 8 years
    It was suggested to me on e1000-devel mailing list that i update BIOS, but it turns out i already have the latest version. It was also suggested that i contact the manufacturer.
  • Kayofeld
    Kayofeld almost 8 years
    I suspect there might be a mistake in your answer: "the older version of the e1000 driver was not aware of the NVM contents of the newer chips". Do you mean that every chip has its own checksum, and the driver is supposed to know them all? Shouldn't the checksum just always be 0, for example? In any case, i tried to use the latest version of e1000e, and the checksum was still invalid. If i have understood correctly, what happened in 2008 (one of your links), was a bug in e1000e which caused arbitrary code execution, which corrupted the NVM. Apparently the bug was fixed by the end of 2008.
  • Kayofeld
    Kayofeld almost 8 years
    I have sent a message to Intel customer support. Maybe i will try Asus too.
  • Kayofeld
    Kayofeld almost 8 years
    As you wrote yourself, NVM_SUM is defined to be 0xBABA, so it does not matter what driver version and what chip version i have.
  • grochmal
    grochmal almost 8 years
    Good one, I did not think of using ethtool to overwrite the actual NVM.
  • Kayofeld
    Kayofeld almost 8 years
    I got help from e1000-devel.
  • Kayofeld
    Kayofeld over 5 years
    As far as i have understood, the invalid NVM checksum will prevent any Ethernet driver from being loaded.
  • Jesper Martin Schumacher
    Jesper Martin Schumacher over 5 years
    I can't comment on that, i just took the chance and used the recent driver, and it works flawlessly for me.
  • Kayofeld
    Kayofeld over 5 years
    Are you sure you had "The NVM Checksum Is Not Valid" message in dmesg output?
  • Kayofeld
    Kayofeld about 3 years
    If not, your answer is completely off-topic.