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.

net: phy: realtek: disable PHY-mode EEE

Realtek RTL8211F has a "PHY-mode" EEE support which interferes with an
IEEE 802.3 compliant implementation. This mode defaults to enabled, and
results in the MAC receive path not seeing the link transition to LPI
state.

Fix this by disabling PHY-mode EEE.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/E1ttnHW-00785s-Uq@rmk-PC.armlinux.org.uk
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Russell King (Oracle) and committed by
Paolo Abeni
bfc17c16 4b9235a8

+9 -2
+9 -2
drivers/net/phy/realtek/realtek_main.c
··· 33 33 34 34 #define RTL8211F_PHYCR1 0x18 35 35 #define RTL8211F_PHYCR2 0x19 36 + #define RTL8211F_CLKOUT_EN BIT(0) 37 + #define RTL8211F_PHYCR2_PHY_EEE_ENABLE BIT(5) 38 + 36 39 #define RTL8211F_INSR 0x1d 37 40 38 41 #define RTL8211F_LEDCR 0x10 ··· 57 54 #define RTL8211E_CTRL_DELAY BIT(13) 58 55 #define RTL8211E_TX_DELAY BIT(12) 59 56 #define RTL8211E_RX_DELAY BIT(11) 60 - 61 - #define RTL8211F_CLKOUT_EN BIT(0) 62 57 63 58 #define RTL8201F_ISR 0x1e 64 59 #define RTL8201F_ISR_ANERR BIT(15) ··· 453 452 "2ns RX delay was already %s (by pin-strapping RXD0 or bootloader configuration)\n", 454 453 str_enabled_disabled(val_rxdly)); 455 454 } 455 + 456 + /* Disable PHY-mode EEE so LPI is passed to the MAC */ 457 + ret = phy_modify_paged(phydev, 0xa43, RTL8211F_PHYCR2, 458 + RTL8211F_PHYCR2_PHY_EEE_ENABLE, 0); 459 + if (ret) 460 + return ret; 456 461 457 462 if (priv->has_phycr2) { 458 463 ret = phy_modify_paged(phydev, 0xa43, RTL8211F_PHYCR2,