diff options
author | Waskiewicz Jr, Peter P <peter.p.waskiewicz.jr@intel.com> | 2009-05-17 08:32:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-18 00:04:07 -0400 |
commit | aca6bee75fe53ae019b9cabff42095dfb6471fde (patch) | |
tree | bf7ebd5d5f0aa301c170a98fbf8baeac13696cd0 /drivers/net/ixgbe/ixgbe_82599.c | |
parent | 0365e6e4373a5a447746fd7ac26074b92f180311 (diff) |
ixgbe: Add SAN MAC address to the RAR, return the address to DCB
After acquiring the SAN MAC address from the EEPROM, we need to program it
into one of the RARs. Also, DCB will use this MAC address to run DCBX
commands, so it doesn't have to play musical MAC addresses when things like
bonding enter the picture. So we need to return the MAC address through
the netlink interface to userspace.
This also moves the init_rx_addrs() call out of start_hw() and into
reset_hw(). We shouldn't try to read any of the RAR information before
initializing our internal accounting of the RAR table, which was what
was happening.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@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/ixgbe/ixgbe_82599.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_82599.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c index 6bc964fdacbe..eaecf5e595c7 100644 --- a/drivers/net/ixgbe/ixgbe_82599.c +++ b/drivers/net/ixgbe/ixgbe_82599.c | |||
@@ -816,12 +816,29 @@ s32 ixgbe_reset_hw_82599(struct ixgbe_hw *hw) | |||
816 | } | 816 | } |
817 | } | 817 | } |
818 | 818 | ||
819 | /* | ||
820 | * Store MAC address from RAR0, clear receive address registers, and | ||
821 | * clear the multicast table. Also reset num_rar_entries to 128, | ||
822 | * since we modify this value when programming the SAN MAC address. | ||
823 | */ | ||
824 | hw->mac.num_rar_entries = 128; | ||
825 | hw->mac.ops.init_rx_addrs(hw); | ||
826 | |||
819 | /* Store the permanent mac address */ | 827 | /* Store the permanent mac address */ |
820 | hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr); | 828 | hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr); |
821 | 829 | ||
822 | /* Store the permanent SAN mac address */ | 830 | /* Store the permanent SAN mac address */ |
823 | hw->mac.ops.get_san_mac_addr(hw, hw->mac.san_addr); | 831 | hw->mac.ops.get_san_mac_addr(hw, hw->mac.san_addr); |
824 | 832 | ||
833 | /* Add the SAN MAC address to the RAR only if it's a valid address */ | ||
834 | if (ixgbe_validate_mac_addr(hw->mac.san_addr) == 0) { | ||
835 | hw->mac.ops.set_rar(hw, hw->mac.num_rar_entries - 1, | ||
836 | hw->mac.san_addr, 0, IXGBE_RAH_AV); | ||
837 | |||
838 | /* Reserve the last RAR for the SAN MAC address */ | ||
839 | hw->mac.num_rar_entries--; | ||
840 | } | ||
841 | |||
825 | reset_hw_out: | 842 | reset_hw_out: |
826 | return status; | 843 | return status; |
827 | } | 844 | } |