aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2012-05-05 01:32:52 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-07-19 21:19:37 -0400
commit7fa7c9dcadcff800a897232204e2128e92dd44cd (patch)
treed621413ba6b799755402f429cd5bb45bf3b98315 /drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
parent7c8ae65a6248518b2775a03129424a7e08fd058a (diff)
ixgbe: Correctly set SAN MAC RAR pool to default pool of PF
This change corrects an issue in which an FCoE enabled adapter was always setting the FCoE SAN MAC MPSAR register to 0x1. This results in the first VF being assigned the SAN MAC address in the case of SR-IOV and as such is incorrect. To resolve this I am adding a new function that will update the SAN MAC pool address after reset. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_common.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_common.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
index bb7fde45c057..bbe9d45c8436 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -2848,6 +2848,31 @@ s32 ixgbe_set_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
2848} 2848}
2849 2849
2850/** 2850/**
2851 * This function should only be involved in the IOV mode.
2852 * In IOV mode, Default pool is next pool after the number of
2853 * VFs advertized and not 0.
2854 * MPSAR table needs to be updated for SAN_MAC RAR [hw->mac.san_mac_rar_index]
2855 *
2856 * ixgbe_set_vmdq_san_mac - Associate default VMDq pool index with a rx address
2857 * @hw: pointer to hardware struct
2858 * @vmdq: VMDq pool index
2859 **/
2860s32 ixgbe_set_vmdq_san_mac_generic(struct ixgbe_hw *hw, u32 vmdq)
2861{
2862 u32 rar = hw->mac.san_mac_rar_index;
2863
2864 if (vmdq < 32) {
2865 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 1 << vmdq);
2866 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 0);
2867 } else {
2868 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 0);
2869 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 1 << (vmdq - 32));
2870 }
2871
2872 return 0;
2873}
2874
2875/**
2851 * ixgbe_init_uta_tables_generic - Initialize the Unicast Table Array 2876 * ixgbe_init_uta_tables_generic - Initialize the Unicast Table Array
2852 * @hw: pointer to hardware structure 2877 * @hw: pointer to hardware structure
2853 **/ 2878 **/