]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: pcs: rtl930x: fold 1G/10G PHY power into {de,}activate
authorJonas Jelonek <jelonek.jonas@gmail.com>
Wed, 22 Apr 2026 14:35:18 +0000 (14:35 +0000)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Tue, 26 May 2026 06:37:59 +0000 (08:37 +0200)
commitfc0fc86e550669beeb24c13d0b25840086c75810
tree6d21dea00addcda13bd8c5c104749a0208a31a23
parentc2f129599e9376638451d3ba89ec861f668534f8
realtek: pcs: rtl930x: fold 1G/10G PHY power into {de,}activate

Move the 1G and 10G PHY block power-up writes (clear BMCR_PDOWN on pages
0x02 and 0x04) out of rtpcs_930x_phy_enable_10g_1g() and into
rtpcs_930x_sds_activate(), and add the mirror writes (set BMCR_PDOWN) to
rtpcs_930x_sds_deactivate(). Same for the fiber RX bit.

With 1G PHY / 10G PHY / fiber RX all now handled symmetrically, drop the
rtpcs_930x_phy_enable_10g_1g() helper. The remaining write it contained
(set medium = fiber on page 0x1f reg 11 bit 1) is unrelated to power
management, unconditionally applied, and to-be-inspected for non-fiber
modes. Move it inline into setup_serdes with a TODO comment; proper
mode-aware handling is out of scope for this commit.

Behavioural note: the 1G/10G PHY blocks and fiber RX are now
power-cycled on every mode transition. Previously they were only
powered up (never explicitly down) and the state persisted across
reconfigure. The new behaviour makes each setup_serdes a standalone
bring-up that does not rely on the prior state of these bits.

Link: https://github.com/openwrt/openwrt/pull/23513
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c