aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb
diff options
context:
space:
mode:
authorFujinaka, Todd <todd.fujinaka@intel.com>2013-09-10 14:57:17 -0400
committerDavid S. Miller <davem@davemloft.net>2013-09-12 16:24:55 -0400
commitc7cb020d0b670428eddd9702dfdc5ff0a48de653 (patch)
treec488dff253f09d429528a41daea12bb35f917581 /drivers/net/ethernet/intel/igb
parentbb1d18d1ad6e216535b994d68097ae107f4f35fb (diff)
igb: Read flow control for i350 from correct EEPROM section
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>
Diffstat (limited to 'drivers/net/ethernet/intel/igb')
-rw-r--r--drivers/net/ethernet/intel/igb/e1000_mac.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/igb/e1000_mac.c b/drivers/net/ethernet/intel/igb/e1000_mac.c
index f0dfd41dd4bd..298f0ed50670 100644
--- a/drivers/net/ethernet/intel/igb/e1000_mac.c
+++ b/drivers/net/ethernet/intel/igb/e1000_mac.c
@@ -712,6 +712,7 @@ static s32 igb_set_fc_watermarks(struct e1000_hw *hw)
712static s32 igb_set_default_fc(struct e1000_hw *hw) 712static s32 igb_set_default_fc(struct e1000_hw *hw)
713{ 713{
714 s32 ret_val = 0; 714 s32 ret_val = 0;
715 u16 lan_offset;
715 u16 nvm_data; 716 u16 nvm_data;
716 717
717 /* Read and store word 0x0F of the EEPROM. This word contains bits 718 /* Read and store word 0x0F of the EEPROM. This word contains bits
@@ -722,7 +723,14 @@ static s32 igb_set_default_fc(struct e1000_hw *hw)
722 * control setting, then the variable hw->fc will 723 * control setting, then the variable hw->fc will
723 * be initialized based on a value in the EEPROM. 724 * be initialized based on a value in the EEPROM.
724 */ 725 */
725 ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, 1, &nvm_data); 726 if (hw->mac.type == e1000_i350) {
727 lan_offset = NVM_82580_LAN_FUNC_OFFSET(hw->bus.func);
728 ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG
729 + lan_offset, 1, &nvm_data);
730 } else {
731 ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG,
732 1, &nvm_data);
733 }
726 734
727 if (ret_val) { 735 if (ret_val) {
728 hw_dbg("NVM Read Error\n"); 736 hw_dbg("NVM Read Error\n");