Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194791
b: refs/heads/master
c: 8a07a22
h: refs/heads/master
i:
  194789: 3f1b0df
  194787: a1232c4
  194783: e4299ad
v: v3
  • Loading branch information
Greg Rose authored and David S. Miller committed May 6, 2010
1 parent 7aa72a5 commit 8dbceed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73422913cab53307214cd13c4fa2c11bf222c2ab
refs/heads/master: 8a07a22d856f37e580557c1a13c8eb8662f9cc11
13 changes: 11 additions & 2 deletions trunk/drivers/net/ixgbe/ixgbe_sriov.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ int ixgbe_set_vf_multicasts(struct ixgbe_adapter *adapter,
int entries, u16 *hash_list, u32 vf)
{
struct vf_data_storage *vfinfo = &adapter->vfinfo[vf];
struct ixgbe_hw *hw = &adapter->hw;
int i;
u32 vector_bit;
u32 vector_reg;
u32 mta_reg;

/* only so many hash values supported */
entries = min(entries, IXGBE_MAX_VF_MC_ENTRIES);
Expand All @@ -68,8 +72,13 @@ int ixgbe_set_vf_multicasts(struct ixgbe_adapter *adapter,
vfinfo->vf_mc_hashes[i] = hash_list[i];;
}

/* Flush and reset the mta with the new values */
ixgbe_set_rx_mode(adapter->netdev);
for (i = 0; i < vfinfo->num_vf_mc_hashes; i++) {
vector_reg = (vfinfo->vf_mc_hashes[i] >> 5) & 0x7F;
vector_bit = vfinfo->vf_mc_hashes[i] & 0x1F;
mta_reg = IXGBE_READ_REG(hw, IXGBE_MTA(vector_reg));
mta_reg |= (1 << vector_bit);
IXGBE_WRITE_REG(hw, IXGBE_MTA(vector_reg), mta_reg);
}

return 0;
}
Expand Down

0 comments on commit 8dbceed

Please sign in to comment.