mirror of
https://github.com/openwrt/openwrt.git
synced 2026-06-17 17:01:44 +04:00
fc0fc86e55
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>