Commit e29054f9 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

[BNX2]: Fix VLAN on ASF

Always set up the device to strip incoming VLAN tags when ASF is
enabled. ASF firmware will not parse packets correctly if VLAN tags
are not stripped.
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3ee68c4a
...@@ -1916,11 +1916,11 @@ bnx2_set_rx_mode(struct net_device *dev) ...@@ -1916,11 +1916,11 @@ bnx2_set_rx_mode(struct net_device *dev)
BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG); BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG);
sort_mode = 1 | BNX2_RPM_SORT_USER0_BC_EN; sort_mode = 1 | BNX2_RPM_SORT_USER0_BC_EN;
#ifdef BCM_VLAN #ifdef BCM_VLAN
if (!bp->vlgrp) { if (!bp->vlgrp && !(bp->flags & ASF_ENABLE_FLAG))
rx_mode |= BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG; rx_mode |= BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG;
}
#else #else
rx_mode |= BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG; if (!(bp->flags & ASF_ENABLE_FLAG))
rx_mode |= BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG;
#endif #endif
if (dev->flags & IFF_PROMISC) { if (dev->flags & IFF_PROMISC) {
/* Promiscuous mode. */ /* Promiscuous mode. */
...@@ -3218,6 +3218,10 @@ bnx2_init_chip(struct bnx2 *bp) ...@@ -3218,6 +3218,10 @@ bnx2_init_chip(struct bnx2 *bp)
REG_WR(bp, BNX2_HC_ATTN_BITS_ENABLE, STATUS_ATTN_BITS_LINK_STATE); REG_WR(bp, BNX2_HC_ATTN_BITS_ENABLE, STATUS_ATTN_BITS_LINK_STATE);
if (REG_RD_IND(bp, bp->shmem_base + BNX2_PORT_FEATURE) &
BNX2_PORT_FEATURE_ASF_ENABLED)
bp->flags |= ASF_ENABLE_FLAG;
/* Initialize the receive filter. */ /* Initialize the receive filter. */
bnx2_set_rx_mode(bp->dev); bnx2_set_rx_mode(bp->dev);
......
...@@ -3956,6 +3956,7 @@ struct bnx2 { ...@@ -3956,6 +3956,7 @@ struct bnx2 {
#define NO_WOL_FLAG 8 #define NO_WOL_FLAG 8
#define USING_DAC_FLAG 0x10 #define USING_DAC_FLAG 0x10
#define USING_MSI_FLAG 0x20 #define USING_MSI_FLAG 0x20
#define ASF_ENABLE_FLAG 0x40
u32 phy_flags; u32 phy_flags;
#define PHY_SERDES_FLAG 1 #define PHY_SERDES_FLAG 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment