]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: phy: aquantia: save a local shadow of GLOBAL_CFG register values
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 21 Aug 2025 15:20:13 +0000 (18:20 +0300)
committerJakub Kicinski <kuba@kernel.org>
Mon, 25 Aug 2025 17:54:15 +0000 (10:54 -0700)
commit08048ba4285eef925cf0dc9dbcef150d31b32ce6
treeb3566a5968ba13358865142fd111607d01789cd0
parentab1dfcb5bce1f32807eb7110ca7e98c2afb72041
net: phy: aquantia: save a local shadow of GLOBAL_CFG register values

Currently, aqr_gen2_fill_interface_modes() reads VEND1_GLOBAL_CFG_*
registers to populate phydev->supported_interfaces. But this is not
the only place which needs to read these registers. There is also
aqr107_read_rate().

Based on the premise that these values are statically set by firmware
and the driver only needs to read them, the proposal is to read them
only once, at config_init() time, and use the cached values also in
aqr107_read_rate().

This patch only refactors the aqr_gen2_fill_interface_modes() code to
save the registers to driver memory, and to populate supported_interfaces
based on that.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20250821152022.1065237-7-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/aquantia/aquantia.h
drivers/net/phy/aquantia/aquantia_main.c