Skip to content

Commit 6e5eed0

Browse files
tlendackydavem330
authored andcommitted
amd-xgbe: VLAN Tx tag insertion fix
The MAC_VLAN_Incl register (0x0060) must be set to indicate that the VLAN tag to be inserted comes from a Tx context descriptor and not the MAC_VLAN_Incl register. Also, even though it is the default, explicitly set the type of tag to be inserted as a CTAG. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d0a8ba6 commit 6e5eed0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

drivers/net/ethernet/amd/xgbe/xgbe-common.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,10 @@
427427
#define MAC_TCR_SS_WIDTH 2
428428
#define MAC_TCR_TE_INDEX 0
429429
#define MAC_TCR_TE_WIDTH 1
430+
#define MAC_VLANIR_VLTI_INDEX 20
431+
#define MAC_VLANIR_VLTI_WIDTH 1
432+
#define MAC_VLANIR_CSVL_INDEX 19
433+
#define MAC_VLANIR_CSVL_WIDTH 1
430434
#define MAC_VLANTR_DOVLTC_INDEX 20
431435
#define MAC_VLANTR_DOVLTC_WIDTH 1
432436
#define MAC_VLANTR_ERSVLM_INDEX 19

drivers/net/ethernet/amd/xgbe/xgbe-dev.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,6 +1541,10 @@ static void xgbe_config_checksum_offload(struct xgbe_prv_data *pdata)
15411541

15421542
static void xgbe_config_vlan_support(struct xgbe_prv_data *pdata)
15431543
{
1544+
/* Indicate that VLAN Tx CTAGs come from context descriptors */
1545+
XGMAC_IOWRITE_BITS(pdata, MAC_VLANIR, CSVL, 0);
1546+
XGMAC_IOWRITE_BITS(pdata, MAC_VLANIR, VLTI, 1);
1547+
15441548
if (pdata->netdev->features & NETIF_F_HW_VLAN_CTAG_RX)
15451549
xgbe_enable_rx_vlan_stripping(pdata);
15461550
else

0 commit comments

Comments
 (0)