Skip to content

Commit 85ab8b2

Browse files
hkallweitdavem330
authored andcommitted
r8169: preserve VLAN setting on RTL8125 in rtl_init_rxcfg
So far we set RX_VLAN_8125 unconditionally, even if NETIF_F_HW_VLAN_CTAG_RX may not be set. Don't touch these bits, and let only rtl8169_set_features() control them. Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a9b3d56 commit 85ab8b2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,6 +2397,8 @@ static void rtl_pll_power_up(struct rtl8169_private *tp)
23972397

23982398
static void rtl_init_rxcfg(struct rtl8169_private *tp)
23992399
{
2400+
u32 vlan;
2401+
24002402
switch (tp->mac_version) {
24012403
case RTL_GIGA_MAC_VER_02 ... RTL_GIGA_MAC_VER_06:
24022404
case RTL_GIGA_MAC_VER_10 ... RTL_GIGA_MAC_VER_17:
@@ -2411,8 +2413,9 @@ static void rtl_init_rxcfg(struct rtl8169_private *tp)
24112413
RTL_W32(tp, RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST | RX_EARLY_OFF);
24122414
break;
24132415
case RTL_GIGA_MAC_VER_60 ... RTL_GIGA_MAC_VER_61:
2414-
RTL_W32(tp, RxConfig, RX_FETCH_DFLT_8125 | RX_VLAN_8125 |
2415-
RX_DMA_BURST);
2416+
/* VLAN flags are controlled by NETIF_F_HW_VLAN_CTAG_RX */
2417+
vlan = RTL_R32(tp, RxConfig) & RX_VLAN_8125;
2418+
RTL_W32(tp, RxConfig, vlan | RX_FETCH_DFLT_8125 | RX_DMA_BURST);
24162419
break;
24172420
default:
24182421
RTL_W32(tp, RxConfig, RX128_INT_EN | RX_DMA_BURST);

0 commit comments

Comments
 (0)