return 0;
}
+int phy_config_inband_aneg(struct phy_device *phydev, bool enabled)
+{
+ if (!phydev->drv)
+ return -EIO;
+
+ if (!phydev->drv->config_inband_aneg)
+ return -EOPNOTSUPP;
+
+ return phydev->drv->config_inband_aneg(phydev, enabled);
+}
+EXPORT_SYMBOL(phy_config_inband_aneg);
+
/**
* phy_start_aneg - start auto-negotiation for this PHY device
* @phydev: the phy_device struct
return ret;
}
+ ret = phy_config_inband_aneg(phy,
+ (pl->cur_link_an_mode == MLO_AN_INBAND));
+ if (ret && ret != -EOPNOTSUPP) {
+ phylink_warn(pl, "failed to configure PHY in-band autoneg: %d\n",
+ ret);
+ return ret;
+ }
+
phy->phylink = pl;
phy->phy_link_change = phylink_phy_change;
*/
int (*config_aneg)(struct phy_device *phydev);
+ /**
+ * @config_inband_aneg: Enable or disable in-band auto-negotiation for
+ * the system-side interface if the PHY operates in a mode that
+ * requires it: (Q)SGMII, USXGMII, 1000Base-X, etc.
+ */
+ int (*config_inband_aneg)(struct phy_device *phydev, bool enabled);
+
/** @aneg_done: Determines the auto negotiation result */
int (*aneg_done)(struct phy_device *phydev);
void phy_start(struct phy_device *phydev);
void phy_stop(struct phy_device *phydev);
int phy_start_aneg(struct phy_device *phydev);
+int phy_config_inband_aneg(struct phy_device *phydev, bool enabled);
int phy_aneg_done(struct phy_device *phydev);
int phy_speed_down(struct phy_device *phydev, bool sync);
int phy_speed_up(struct phy_device *phydev);