diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2009-03-20 03:17:25 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-22 02:57:02 +0300 |
commit | c5cd11e380002d24fd4fd4c0fc38f59ab394e885 (patch) | |
tree | e2d2f38c0dbfd10a4f839f58e4a1f6a282012c72 /drivers/net/igb | |
parent | 0e340485725ea35ca4e354cce5df09e86e31e20d (diff) | |
download | linux-c5cd11e380002d24fd4fd4c0fc38f59ab394e885.tar.xz |
igb: rework igb_set_multi so that vfs are properly updated
Currently if there are no multicast addresses programmed into the PF then
the VFs cannot have their multicast filters reset. This change makes it so
the code path that updates vf multicast is always called along with the pf
updates.
Signed-off-by: Alexander Duyck <alexander.h.duyck@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/igb')
-rw-r--r-- | drivers/net/igb/igb_main.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 4853a74843ec..d6dda1621166 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c @@ -2464,7 +2464,7 @@ static void igb_set_multi(struct net_device *netdev) struct e1000_hw *hw = &adapter->hw; struct e1000_mac_info *mac = &hw->mac; struct dev_mc_list *mc_ptr; - u8 *mta_list; + u8 *mta_list = NULL; u32 rctl; int i; @@ -2485,17 +2485,15 @@ static void igb_set_multi(struct net_device *netdev) } wr32(E1000_RCTL, rctl); - if (!netdev->mc_count) { - /* nothing to program, so clear mc list */ - igb_update_mc_addr_list(hw, NULL, 0, 1, - mac->rar_entry_count); - return; + if (netdev->mc_count) { + mta_list = kzalloc(netdev->mc_count * 6, GFP_ATOMIC); + if (!mta_list) { + dev_err(&adapter->pdev->dev, + "failed to allocate multicast filter list\n"); + return; + } } - mta_list = kzalloc(netdev->mc_count * 6, GFP_ATOMIC); - if (!mta_list) - return; - /* The shared function expects a packed array of only addresses. */ mc_ptr = netdev->mc_list; |