diff options
| -rw-r--r-- | drivers/net/ixgbe/ixgbe_sriov.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe_sriov.c b/drivers/net/ixgbe/ixgbe_sriov.c index c4e5150a27eb..f6cee94ec8e8 100644 --- a/drivers/net/ixgbe/ixgbe_sriov.c +++ b/drivers/net/ixgbe/ixgbe_sriov.c | |||
| @@ -48,7 +48,11 @@ int ixgbe_set_vf_multicasts(struct ixgbe_adapter *adapter, | |||
| 48 | int entries, u16 *hash_list, u32 vf) | 48 | int entries, u16 *hash_list, u32 vf) |
| 49 | { | 49 | { |
| 50 | struct vf_data_storage *vfinfo = &adapter->vfinfo[vf]; | 50 | struct vf_data_storage *vfinfo = &adapter->vfinfo[vf]; |
| 51 | struct ixgbe_hw *hw = &adapter->hw; | ||
| 51 | int i; | 52 | int i; |
| 53 | u32 vector_bit; | ||
| 54 | u32 vector_reg; | ||
| 55 | u32 mta_reg; | ||
| 52 | 56 | ||
| 53 | /* only so many hash values supported */ | 57 | /* only so many hash values supported */ |
| 54 | entries = min(entries, IXGBE_MAX_VF_MC_ENTRIES); | 58 | entries = min(entries, IXGBE_MAX_VF_MC_ENTRIES); |
| @@ -68,8 +72,13 @@ int ixgbe_set_vf_multicasts(struct ixgbe_adapter *adapter, | |||
| 68 | vfinfo->vf_mc_hashes[i] = hash_list[i];; | 72 | vfinfo->vf_mc_hashes[i] = hash_list[i];; |
| 69 | } | 73 | } |
| 70 | 74 | ||
| 71 | /* Flush and reset the mta with the new values */ | 75 | for (i = 0; i < vfinfo->num_vf_mc_hashes; i++) { |
| 72 | ixgbe_set_rx_mode(adapter->netdev); | 76 | vector_reg = (vfinfo->vf_mc_hashes[i] >> 5) & 0x7F; |
| 77 | vector_bit = vfinfo->vf_mc_hashes[i] & 0x1F; | ||
| 78 | mta_reg = IXGBE_READ_REG(hw, IXGBE_MTA(vector_reg)); | ||
| 79 | mta_reg |= (1 << vector_bit); | ||
| 80 | IXGBE_WRITE_REG(hw, IXGBE_MTA(vector_reg), mta_reg); | ||
| 81 | } | ||
| 73 | 82 | ||
| 74 | return 0; | 83 | return 0; |
| 75 | } | 84 | } |
