Skip to content

Commit

Permalink
igb: Read flow control for i350 from correct EEPROM section
Browse files Browse the repository at this point in the history
Flow control is defined in the four EEPROM sections but the driver only reads
from section 0.

Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Fujinaka, Todd authored and David S. Miller committed Sep 12, 2013
1 parent bb1d18d commit c7cb020
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/net/ethernet/intel/igb/e1000_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ static s32 igb_set_fc_watermarks(struct e1000_hw *hw)
static s32 igb_set_default_fc(struct e1000_hw *hw)
{
s32 ret_val = 0;
u16 lan_offset;
u16 nvm_data;

/* Read and store word 0x0F of the EEPROM. This word contains bits
Expand All @@ -722,7 +723,14 @@ static s32 igb_set_default_fc(struct e1000_hw *hw)
* control setting, then the variable hw->fc will
* be initialized based on a value in the EEPROM.
*/
ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, 1, &nvm_data);
if (hw->mac.type == e1000_i350) {
lan_offset = NVM_82580_LAN_FUNC_OFFSET(hw->bus.func);
ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG
+ lan_offset, 1, &nvm_data);
} else {
ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG,
1, &nvm_data);
}

if (ret_val) {
hw_dbg("NVM Read Error\n");
Expand Down

0 comments on commit c7cb020

Please sign in to comment.