Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

r8169: set EEE speed down ratio to 1

EEE speed down means speed down MAC MCU clock. It is not from spec.
It is kind of Realtek specific power saving feature. But enable it
may cause some issues, like packet drop or interrupt loss. Different
hardware may have different issues.

EEE speed down ratio (mac ocp 0xe056[7:4]) is used to set EEE speed
down rate. The larger this value is, the more power can save. But it
actually save less power then we expected. And, as mentioned above,
will impact compatibility. So set it to 1 (mac ocp 0xe056[7:4] = 0)
, which means not to speed down, to improve compatibility.

Signed-off-by: ChunHao Lin <hau@realtek.com>
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/20250918023425.3463-1-hau@realtek.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

ChunHao Lin and committed by
Jakub Kicinski
bf7154ff a346e48c

+3 -3
+3 -3
drivers/net/ethernet/realtek/r8169_main.c
··· 3409 3409 r8168_mac_ocp_modify(tp, 0xd412, 0x0fff, sw_cnt_1ms_ini); 3410 3410 } 3411 3411 3412 - r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0070); 3412 + r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000); 3413 3413 r8168_mac_ocp_modify(tp, 0xe052, 0x6000, 0x8008); 3414 3414 r8168_mac_ocp_modify(tp, 0xe0d6, 0x01ff, 0x017f); 3415 3415 r8168_mac_ocp_modify(tp, 0xd420, 0x0fff, 0x047f); ··· 3514 3514 r8168_mac_ocp_modify(tp, 0xd412, 0x0fff, sw_cnt_1ms_ini); 3515 3515 } 3516 3516 3517 - r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0070); 3517 + r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000); 3518 3518 r8168_mac_ocp_write(tp, 0xea80, 0x0003); 3519 3519 r8168_mac_ocp_modify(tp, 0xe052, 0x0000, 0x0009); 3520 3520 r8168_mac_ocp_modify(tp, 0xd420, 0x0fff, 0x047f); ··· 3715 3715 r8168_mac_ocp_modify(tp, 0xc0b4, 0x0000, 0x000c); 3716 3716 r8168_mac_ocp_modify(tp, 0xeb6a, 0x00ff, 0x0033); 3717 3717 r8168_mac_ocp_modify(tp, 0xeb50, 0x03e0, 0x0040); 3718 - r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0030); 3718 + r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000); 3719 3719 r8168_mac_ocp_modify(tp, 0xe040, 0x1000, 0x0000); 3720 3720 r8168_mac_ocp_modify(tp, 0xea1c, 0x0003, 0x0001); 3721 3721 if (tp->mac_version == RTL_GIGA_MAC_VER_70 ||