Hi,
On 6/9/26 04:07, javen wrote:
From: Javen Xu <redacted>
This patch adds support for Realtek phy chip RTL8261C_CG. Its PHY ID is
0x001cc898.
Signed-off-by: Javen Xu <redacted>
[...]
+static int rtl8261x_config_aneg(struct phy_device *phydev)
+{
+ bool changed = false;
+ u16 adv_1g = 0;
+ int ret;
+
+ if (phydev->autoneg == AUTONEG_DISABLE)
+ return genphy_c45_pma_setup_forced(phydev);
This condition above is already done when calling genphy_c45_config_aneg,
is it really necessary to put it there ?
+
+ ret = genphy_c45_an_setup_master_slave(phydev);
+ if (ret < 0)
+ return ret;
+ if (ret > 0)
+ changed = true;
I'm wondering if this call to genphy_c45_an_setup_master_slave() may actually
be integrated directly into genphy_c45_config_aneg(), as we do for C22.
It _may_ break some C45 phys that would rely on default values though, but this
should be more correct ?
Maxime