diff options
author | Emil Tantilov <emil.s.tantilov@intel.com> | 2010-05-13 17:33:00 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-13 21:07:32 -0700 |
commit | e433ea1fb03c10debf101019668b83abed041c24 (patch) | |
tree | e337d64fc7be738c1220b0e66fa4c1e5a5f4c552 /drivers/net/ixgbe/ixgbe_main.c | |
parent | e7874c996b8591f59d78efa519031dab5b58723b (diff) |
ixgbe: fix setting of promisc mode when using mac-vlans
Introduce uc_set_promisc flag to fix enabling of promisc mode
when exceeding the number of supported RAR entries.
Issue discovered by Ben Greear when using mac-vlans.
Reported-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@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/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index d1a1868df81..15032c79e00 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -2952,7 +2952,7 @@ void ixgbe_set_rx_mode(struct net_device *netdev) fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL); if (netdev->flags & IFF_PROMISC) { - hw->addr_ctrl.user_set_promisc = 1; + hw->addr_ctrl.user_set_promisc = true; fctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE); /* don't hardware filter vlans in promisc mode */ ixgbe_vlan_filter_disable(adapter); @@ -2960,11 +2960,11 @@ void ixgbe_set_rx_mode(struct net_device *netdev) if (netdev->flags & IFF_ALLMULTI) { fctrl |= IXGBE_FCTRL_MPE; fctrl &= ~IXGBE_FCTRL_UPE; - } else { + } else if (!hw->addr_ctrl.uc_set_promisc) { fctrl &= ~(IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE); } ixgbe_vlan_filter_enable(adapter); - hw->addr_ctrl.user_set_promisc = 0; + hw->addr_ctrl.user_set_promisc = false; } IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl); |