Skip to content

Commit d52caf0

Browse files
committed
Merge branch 'r8169-sync-hw-config-for-few-chip-versions-with-r8168-vendor-driver'
Heiner Kallweit says: ==================== r8169: sync hw config for few chip versions with r8168 vendor driver Sync hw config for few chip versions with r8168 vendor driver. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 3248044 + d05890c commit d52caf0

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2926,12 +2926,14 @@ static void rtl_hw_start_8168e_2(struct rtl8169_private *tp)
29262926
rtl_ephy_init(tp, e_info_8168e_2);
29272927

29282928
rtl_eri_write(tp, 0xc0, ERIAR_MASK_0011, 0x0000);
2929-
rtl_eri_write(tp, 0xb8, ERIAR_MASK_0011, 0x0000);
2929+
rtl_eri_write(tp, 0xb8, ERIAR_MASK_1111, 0x0000);
29302930
rtl_set_fifo_size(tp, 0x10, 0x10, 0x02, 0x06);
2931+
rtl_eri_set_bits(tp, 0x0d4, 0x1f00);
2932+
rtl_eri_set_bits(tp, 0x1d0, BIT(1));
2933+
rtl_reset_packet_filter(tp);
2934+
rtl_eri_set_bits(tp, 0x1b0, BIT(4));
29312935
rtl_eri_write(tp, 0xcc, ERIAR_MASK_1111, 0x00000050);
29322936
rtl_eri_write(tp, 0xd0, ERIAR_MASK_1111, 0x07ff0060);
2933-
rtl_eri_set_bits(tp, 0x1b0, BIT(4));
2934-
rtl_w0w1_eri(tp, 0x0d4, 0x0c00, 0xff00);
29352937

29362938
rtl_disable_clock_request(tp);
29372939

@@ -2951,11 +2953,11 @@ static void rtl_hw_start_8168f(struct rtl8169_private *tp)
29512953
rtl_set_def_aspm_entry_latency(tp);
29522954

29532955
rtl_eri_write(tp, 0xc0, ERIAR_MASK_0011, 0x0000);
2954-
rtl_eri_write(tp, 0xb8, ERIAR_MASK_0011, 0x0000);
2956+
rtl_eri_write(tp, 0xb8, ERIAR_MASK_1111, 0x0000);
29552957
rtl_set_fifo_size(tp, 0x10, 0x10, 0x02, 0x06);
29562958
rtl_reset_packet_filter(tp);
29572959
rtl_eri_set_bits(tp, 0x1b0, BIT(4));
2958-
rtl_eri_set_bits(tp, 0x1d0, BIT(4));
2960+
rtl_eri_set_bits(tp, 0x1d0, BIT(4) | BIT(1));
29592961
rtl_eri_write(tp, 0xcc, ERIAR_MASK_1111, 0x00000050);
29602962
rtl_eri_write(tp, 0xd0, ERIAR_MASK_1111, 0x00000060);
29612963

@@ -2984,7 +2986,7 @@ static void rtl_hw_start_8168f_1(struct rtl8169_private *tp)
29842986

29852987
rtl_ephy_init(tp, e_info_8168f_1);
29862988

2987-
rtl_w0w1_eri(tp, 0x0d4, 0x0c00, 0xff00);
2989+
rtl_eri_set_bits(tp, 0x0d4, 0x1f00);
29882990
}
29892991

29902992
static void rtl_hw_start_8411(struct rtl8169_private *tp)
@@ -3019,6 +3021,7 @@ static void rtl_hw_start_8168g(struct rtl8169_private *tp)
30193021

30203022
rtl_eri_write(tp, 0xc0, ERIAR_MASK_0011, 0x0000);
30213023
rtl_eri_write(tp, 0xb8, ERIAR_MASK_0011, 0x0000);
3024+
rtl_eri_set_bits(tp, 0x0d4, 0x1f80);
30223025

30233026
rtl8168_config_eee_mac(tp);
30243027

@@ -3249,9 +3252,8 @@ static void rtl_hw_start_8168h_1(struct rtl8169_private *tp)
32493252

32503253
rtl_reset_packet_filter(tp);
32513254

3252-
rtl_eri_set_bits(tp, 0xdc, BIT(4));
3253-
32543255
rtl_eri_set_bits(tp, 0xd4, 0x1f00);
3256+
rtl_eri_set_bits(tp, 0xdc, 0x001c);
32553257

32563258
rtl_eri_write(tp, 0x5f0, ERIAR_MASK_0011, 0x4f87);
32573259

0 commit comments

Comments
 (0)