[PATCH] e1000: Fix EEPROM read logic
Fixed read_eeprom logic to test use_eerd instead of testing for 82573 controllers. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This commit is contained in:
committed by
Jeff Garzik
parent
526f99572e
commit
4d351858e4
@@ -3888,14 +3888,16 @@ e1000_read_eeprom(struct e1000_hw *hw,
|
|||||||
return -E1000_ERR_EEPROM;
|
return -E1000_ERR_EEPROM;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FLASH reads without acquiring the semaphore are safe in 82573-based
|
/* FLASH reads without acquiring the semaphore are safe */
|
||||||
* controllers.
|
if (e1000_is_onboard_nvm_eeprom(hw) == TRUE &&
|
||||||
*/
|
hw->eeprom.use_eerd == FALSE) {
|
||||||
if ((e1000_is_onboard_nvm_eeprom(hw) == TRUE) ||
|
switch (hw->mac_type) {
|
||||||
(hw->mac_type != e1000_82573)) {
|
default:
|
||||||
/* Prepare the EEPROM for reading */
|
/* Prepare the EEPROM for reading */
|
||||||
if (e1000_acquire_eeprom(hw) != E1000_SUCCESS)
|
if (e1000_acquire_eeprom(hw) != E1000_SUCCESS)
|
||||||
return -E1000_ERR_EEPROM;
|
return -E1000_ERR_EEPROM;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(eeprom->use_eerd == TRUE) {
|
if(eeprom->use_eerd == TRUE) {
|
||||||
|
Reference in New Issue
Block a user