quoted
+static int gpy_config_aneg(struct phy_device *phydev)
+{
+ bool changed = false;
+ u32 adv;
+ int ret;
+
+ if (phydev->autoneg == AUTONEG_DISABLE) {
+ return phydev->duplex != DUPLEX_FULL
+ ? genphy_setup_forced(phydev)
+ : genphy_c45_pma_setup_forced(phydev);
I think this needs a comment to describe what is going on here to
explain why the duplex setting influences whether we program the PHY
via C22 or C45.
Thank you for review.
We support half/full duplex for 10/100/1000 and full duplex only for 2500.
genphy_c45_pma_setup_forced supports full duplex only.
So in half duplex, I use genphy_setup_forced.
Is there recommended way to handle this situation?
Or I should keep this code and put a comment.