]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: phy: realtek: create rtl8211f_config_rgmii_delay()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 17 Nov 2025 23:40:28 +0000 (01:40 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 20 Nov 2025 04:24:22 +0000 (20:24 -0800)
commit8e982441ba601d982dd0739972115d85ae01d99b
tree8a8ac6b95928eb763fdb12def7f8e98e2b462e91
parent672cb5c2a9584802ad43d61209d5e24cccee823d
net: phy: realtek: create rtl8211f_config_rgmii_delay()

The control flow in rtl8211f_config_init() has some pitfalls which were
probably unintended. Specifically it has an early return:

switch (phydev->interface) {
...
default: /* the rest of the modes imply leaving delay as is. */
return 0;
}

which exits the entire config_init() function. This means it also skips
doing things such as disabling CLKOUT or disabling PHY-mode EEE.

For the RTL8211FS, which uses PHY_INTERFACE_MODE_SGMII, this might be a
problem. However, I don't know that it is, so there is no Fixes: tag.
The issue was observed through code inspection.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20251117234033.345679-2-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/realtek/realtek_main.c