Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d351858 authored by Jeff Kirsher's avatar Jeff Kirsher Committed by Jeff Garzik
Browse files

[PATCH] e1000: Fix EEPROM read logic



Fixed read_eeprom logic to test use_eerd instead of testing for 82573 controllers.

Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: default avatarJohn Ronciak <john.ronciak@intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 526f9957
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -3888,14 +3888,16 @@ e1000_read_eeprom(struct e1000_hw *hw,
        return -E1000_ERR_EEPROM;
    }

    /* FLASH reads without acquiring the semaphore are safe in 82573-based
     * controllers.
     */
    if ((e1000_is_onboard_nvm_eeprom(hw) == TRUE) ||
        (hw->mac_type != e1000_82573)) {
    /* FLASH reads without acquiring the semaphore are safe */
    if (e1000_is_onboard_nvm_eeprom(hw) == TRUE &&
    hw->eeprom.use_eerd == FALSE) {
        switch (hw->mac_type) {
        default:
            /* Prepare the EEPROM for reading  */
            if (e1000_acquire_eeprom(hw) != E1000_SUCCESS)
                return -E1000_ERR_EEPROM;
            break;
        }
    }

    if(eeprom->use_eerd == TRUE) {