Skip to content

Commit

Permalink
igb: fix vlan filtering in promisc mode when not in VT mode
Browse files Browse the repository at this point in the history
This patch fixes a VT mode check to make sure VLAN filters are disabled when
in promisc mode and VT is not enabled.

The problem with the previous check was that:
E1000_MRQC_ENABLE_VMDQ is defined as 0x00000003

but when not in VT mode:
mrqc |= E1000_MRQC_ENABLE_RSS_4Q (0x00000002)

So the above check will trigger regardless if VT mode is being used or not.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Emil Tantilov authored and David S. Miller committed Jul 28, 2013
1 parent 1eb9ac1 commit 7e44892
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/intel/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3739,9 +3739,8 @@ static void igb_set_rx_mode(struct net_device *netdev)
rctl &= ~(E1000_RCTL_UPE | E1000_RCTL_MPE | E1000_RCTL_VFE);

if (netdev->flags & IFF_PROMISC) {
u32 mrqc = rd32(E1000_MRQC);
/* retain VLAN HW filtering if in VT mode */
if (mrqc & E1000_MRQC_ENABLE_VMDQ)
if (adapter->vfs_allocated_count)
rctl |= E1000_RCTL_VFE;
rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE);
vmolr |= (E1000_VMOLR_ROPE | E1000_VMOLR_MPME);
Expand Down

0 comments on commit 7e44892

Please sign in to comment.