[PATCH 3.17 102/122] ixgbe: Correctly disable VLAN filter in promiscuous mode

From: Greg Kroah-Hartman
Date: Fri Dec 05 2014 - 17:48:13 EST

3.17-stable review patch. If anyone has any objections, please let me know.


From: Vlad Yasevich <vyasevich@xxxxxxxxx>

commit 4556dc591691fca743518edb24f15fbc83b5c8ef upstream.

IXGBE adapter seems to require that VLAN filtering be enabled if
VMDQ or SRIOV are enabled. When those functions are disabled,
VLAN filtering may be disabled in promiscuous mode.

Prior to commit a9b8943ee129 ("ixgbe: remove vlan_filter_disable
and enable functions")

The logic was correct. However, after the commit the logic
got reversed and VLAN filtered in now turned on when VMDQ/SRIOV
is disabled.

This patch changes the condition to enable hw vlan filtered
when VMDQ or SRIOV is enabled.

Fixes: a9b8943ee129 ("ixgbe: remove vlan_filter_disable and enable functions")
CC: Jacob Keller <jacob.e.keller@xxxxxxxxx>
Signed-off-by: Vladislav Yasevich <vyasevic@xxxxxxxxxx>
Acked-by: Emil Tantilov <emil.s.tantilov@xxxxxxxxx>
Tested-by: Phil Schmitt <phillip.j.schmitt@xxxxxxxxx>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -4059,8 +4059,8 @@ void ixgbe_set_rx_mode(struct net_device
* if SR-IOV and VMDQ are disabled - otherwise ensure
* that hardware VLAN filters remain enabled.
- if (!(adapter->flags & (IXGBE_FLAG_VMDQ_ENABLED |
+ if (adapter->flags & (IXGBE_FLAG_VMDQ_ENABLED |
} else {
if (netdev->flags & IFF_ALLMULTI) {

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/