Commit 2c673015 authored by Marek Vasut's avatar Marek Vasut Committed by Jakub Kicinski
Browse files

net: phy: realtek: Avoid PHYCR2 access if PHYCR2 not present



The driver is currently checking for PHYCR2 register presence in
rtl8211f_config_init(), but it does so after accessing PHYCR2 to
disable EEE. This was introduced in commit bfc17c16 ("net:
phy: realtek: disable PHY-mode EEE"). Move the PHYCR2 presence
test before the EEE disablement and simplify the code.

Fixes: bfc17c16 ("net: phy: realtek: disable PHY-mode EEE")
Signed-off-by: default avatarMarek Vasut <marek.vasut@mailbox.org>
Reviewed-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/20251011110309.12664-1-marek.vasut@mailbox.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent d1d5df46
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment