Skip to content

Commit

Permalink
[PATCH] e1000: Fix EEPROM read logic
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Kirsher authored and Jeff Garzik committed Jan 17, 2006
1 parent 526f995 commit 4d35185
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions drivers/net/e1000/e1000_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
/* Prepare the EEPROM for reading */
if(e1000_acquire_eeprom(hw) != E1000_SUCCESS)
return -E1000_ERR_EEPROM;
/* 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) {
Expand Down

0 comments on commit 4d35185

Please sign in to comment.