Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5cd11e3 authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller
Browse files

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: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0e340485
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -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,16 +2485,14 @@ 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)
		if (!mta_list) {
			dev_err(&adapter->pdev->dev,
			        "failed to allocate multicast filter list\n");
			return;
		}
	}

	/* The shared function expects a packed array of only addresses. */
	mc_ptr = netdev->mc_list;