Commit 278675d8 authored by Emil Tantilov's avatar Emil Tantilov Committed by Jeff Kirsher

ixgbe: store permanent address before initializing Rx addresses

We were reading the address after it had been initialized and this results
in the permanent address on the system being changed.  This change corrects
that by storing the address before we re-initialize it.
Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
Tested-by: default avatarStephen Ko <stephen.s.ko@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 8c7bea32
...@@ -831,15 +831,15 @@ static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw) ...@@ -831,15 +831,15 @@ static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw)
IXGBE_WRITE_REG(hw, IXGBE_AUTOC, hw->mac.orig_autoc); IXGBE_WRITE_REG(hw, IXGBE_AUTOC, hw->mac.orig_autoc);
} }
/* Store the permanent mac address */
hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr);
/* /*
* Store MAC address from RAR0, clear receive address registers, and * Store MAC address from RAR0, clear receive address registers, and
* clear the multicast table * clear the multicast table
*/ */
hw->mac.ops.init_rx_addrs(hw); hw->mac.ops.init_rx_addrs(hw);
/* Store the permanent mac address */
hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr);
reset_hw_out: reset_hw_out:
if (phy_status) if (phy_status)
status = phy_status; status = phy_status;
......
...@@ -965,6 +965,9 @@ static s32 ixgbe_reset_hw_82599(struct ixgbe_hw *hw) ...@@ -965,6 +965,9 @@ static s32 ixgbe_reset_hw_82599(struct ixgbe_hw *hw)
} }
} }
/* Store the permanent mac address */
hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr);
/* /*
* Store MAC address from RAR0, clear receive address registers, and * Store MAC address from RAR0, clear receive address registers, and
* clear the multicast table. Also reset num_rar_entries to 128, * clear the multicast table. Also reset num_rar_entries to 128,
...@@ -973,9 +976,6 @@ static s32 ixgbe_reset_hw_82599(struct ixgbe_hw *hw) ...@@ -973,9 +976,6 @@ static s32 ixgbe_reset_hw_82599(struct ixgbe_hw *hw)
hw->mac.num_rar_entries = 128; hw->mac.num_rar_entries = 128;
hw->mac.ops.init_rx_addrs(hw); hw->mac.ops.init_rx_addrs(hw);
/* Store the permanent mac address */
hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr);
/* Store the permanent SAN mac address */ /* Store the permanent SAN mac address */
hw->mac.ops.get_san_mac_addr(hw, hw->mac.san_addr); hw->mac.ops.get_san_mac_addr(hw, hw->mac.san_addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment