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

r8169: move EEE LED config to rtl8168_config_eee_mac

Move adjusting the EEE LED frequency to rtl8168_config_eee_mac.
Exclude RTL8411 (version 38) like in the existing code.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Heiner Kallweit and committed by
David S. Miller
f452825d 1791ad50

+4 -15
+4 -15
drivers/net/ethernet/realtek/r8169.c
··· 2553 2553 2554 2554 static void rtl8168_config_eee_mac(struct rtl8169_private *tp) 2555 2555 { 2556 + /* Adjust EEE LED frequency */ 2557 + if (tp->mac_version != RTL_GIGA_MAC_VER_38) 2558 + RTL_W8(tp, EEE_LED, RTL_R8(tp, EEE_LED) & ~0x07); 2559 + 2556 2560 rtl_eri_set_bits(tp, 0x1b0, ERIAR_MASK_1111, 0x0003); 2557 2561 } 2558 2562 ··· 4995 4991 4996 4992 RTL_W8(tp, MCU, RTL_R8(tp, MCU) & ~NOW_IS_OOB); 4997 4993 4998 - /* Adjust EEE LED frequency */ 4999 - RTL_W8(tp, EEE_LED, RTL_R8(tp, EEE_LED) & ~0x07); 5000 - 5001 4994 rtl8168_config_eee_mac(tp); 5002 4995 5003 4996 RTL_W8(tp, DLLPR, RTL_R8(tp, DLLPR) | PFM_EN); ··· 5046 5045 rtl_ephy_init(tp, e_info_8168f_1); 5047 5046 5048 5047 rtl_w0w1_eri(tp, 0x0d4, ERIAR_MASK_0011, 0x0c00, 0xff00); 5049 - 5050 - /* Adjust EEE LED frequency */ 5051 - RTL_W8(tp, EEE_LED, RTL_R8(tp, EEE_LED) & ~0x07); 5052 5048 } 5053 5049 5054 5050 static void rtl_hw_start_8411(struct rtl8169_private *tp) ··· 5084 5086 5085 5087 rtl_eri_write(tp, 0xc0, ERIAR_MASK_0011, 0x0000); 5086 5088 rtl_eri_write(tp, 0xb8, ERIAR_MASK_0011, 0x0000); 5087 - 5088 - /* Adjust EEE LED frequency */ 5089 - RTL_W8(tp, EEE_LED, RTL_R8(tp, EEE_LED) & ~0x07); 5090 5089 5091 5090 rtl8168_config_eee_mac(tp); 5092 5091 ··· 5185 5190 rtl_eri_write(tp, 0xc0, ERIAR_MASK_0011, 0x0000); 5186 5191 rtl_eri_write(tp, 0xb8, ERIAR_MASK_0011, 0x0000); 5187 5192 5188 - /* Adjust EEE LED frequency */ 5189 - RTL_W8(tp, EEE_LED, RTL_R8(tp, EEE_LED) & ~0x07); 5190 - 5191 5193 rtl8168_config_eee_mac(tp); 5192 5194 5193 5195 RTL_W8(tp, DLLPR, RTL_R8(tp, DLLPR) & ~PFM_EN); ··· 5262 5270 5263 5271 rtl_eri_write(tp, 0xc0, ERIAR_MASK_0011, 0x0000); 5264 5272 rtl_eri_write(tp, 0xb8, ERIAR_MASK_0011, 0x0000); 5265 - 5266 - /* Adjust EEE LED frequency */ 5267 - RTL_W8(tp, EEE_LED, RTL_R8(tp, EEE_LED) & ~0x07); 5268 5273 5269 5274 rtl8168_config_eee_mac(tp); 5270 5275