diff options
author | Michael Chan <mchan@broadcom.com> | 2006-01-23 19:06:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-01-23 19:06:06 -0500 |
commit | e29054f92d7d575631691865c1b95bee5bc974cc (patch) | |
tree | 91b98019ebdae5697ab4ebdec626c8201497c7c7 /drivers | |
parent | 3ee68c4af3fd7228c1be63254b9f884614f9ebb2 (diff) |
[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: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bnx2.c | 10 | ||||
-rw-r--r-- | drivers/net/bnx2.h | 1 |
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 49fa1e4413fa..790dc926acae 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -1916,11 +1916,11 @@ bnx2_set_rx_mode(struct net_device *dev) | |||
1916 | BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG); | 1916 | BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG); |
1917 | sort_mode = 1 | BNX2_RPM_SORT_USER0_BC_EN; | 1917 | sort_mode = 1 | BNX2_RPM_SORT_USER0_BC_EN; |
1918 | #ifdef BCM_VLAN | 1918 | #ifdef BCM_VLAN |
1919 | if (!bp->vlgrp) { | 1919 | if (!bp->vlgrp && !(bp->flags & ASF_ENABLE_FLAG)) |
1920 | rx_mode |= BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG; | 1920 | rx_mode |= BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG; |
1921 | } | ||
1922 | #else | 1921 | #else |
1923 | rx_mode |= BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG; | 1922 | if (!(bp->flags & ASF_ENABLE_FLAG)) |
1923 | rx_mode |= BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG; | ||
1924 | #endif | 1924 | #endif |
1925 | if (dev->flags & IFF_PROMISC) { | 1925 | if (dev->flags & IFF_PROMISC) { |
1926 | /* Promiscuous mode. */ | 1926 | /* Promiscuous mode. */ |
@@ -3218,6 +3218,10 @@ bnx2_init_chip(struct bnx2 *bp) | |||
3218 | 3218 | ||
3219 | REG_WR(bp, BNX2_HC_ATTN_BITS_ENABLE, STATUS_ATTN_BITS_LINK_STATE); | 3219 | REG_WR(bp, BNX2_HC_ATTN_BITS_ENABLE, STATUS_ATTN_BITS_LINK_STATE); |
3220 | 3220 | ||
3221 | if (REG_RD_IND(bp, bp->shmem_base + BNX2_PORT_FEATURE) & | ||
3222 | BNX2_PORT_FEATURE_ASF_ENABLED) | ||
3223 | bp->flags |= ASF_ENABLE_FLAG; | ||
3224 | |||
3221 | /* Initialize the receive filter. */ | 3225 | /* Initialize the receive filter. */ |
3222 | bnx2_set_rx_mode(bp->dev); | 3226 | bnx2_set_rx_mode(bp->dev); |
3223 | 3227 | ||
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index 76bb5f1a250b..8a70311d781f 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
@@ -3956,6 +3956,7 @@ struct bnx2 { | |||
3956 | #define NO_WOL_FLAG 8 | 3956 | #define NO_WOL_FLAG 8 |
3957 | #define USING_DAC_FLAG 0x10 | 3957 | #define USING_DAC_FLAG 0x10 |
3958 | #define USING_MSI_FLAG 0x20 | 3958 | #define USING_MSI_FLAG 0x20 |
3959 | #define ASF_ENABLE_FLAG 0x40 | ||
3959 | 3960 | ||
3960 | u32 phy_flags; | 3961 | u32 phy_flags; |
3961 | #define PHY_SERDES_FLAG 1 | 3962 | #define PHY_SERDES_FLAG 1 |