igb: Alternate MAC Address Updates for Func2&3
authorAkeem G. Abodunrin <akeem.g.abodunrin@intel.com>
Fri, 2 Sep 2011 23:09:30 +0000 (23:09 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 6 Oct 2011 10:42:12 +0000 (03:42 -0700)
Only function 1 has support for Alternate MAC Address in the EEPROM before,
this update now allow function 2 and 3 to have support for Alternate MAC
Address in the EEPROM.

Signed-off-by: "Akeem G. Abodunrin" <akeem.g.abodunrin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/e1000_mac.c

index 79071838eb140cf44428565c943616250685a84a..872119d91afd495f722f03c35675f4a7f3d73add 100644 (file)
@@ -205,6 +205,11 @@ s32 igb_check_alt_mac_addr(struct e1000_hw *hw)
 
        if (hw->bus.func == E1000_FUNC_1)
                nvm_alt_mac_addr_offset += E1000_ALT_MAC_ADDRESS_OFFSET_LAN1;
+       if (hw->bus.func == E1000_FUNC_2)
+               nvm_alt_mac_addr_offset += E1000_ALT_MAC_ADDRESS_OFFSET_LAN2;
+
+       if (hw->bus.func == E1000_FUNC_3)
+               nvm_alt_mac_addr_offset += E1000_ALT_MAC_ADDRESS_OFFSET_LAN3;
        for (i = 0; i < ETH_ALEN; i += 2) {
                offset = nvm_alt_mac_addr_offset + (i >> 1);
                ret_val = hw->nvm.ops.read(hw, offset, 1, &nvm_data);