staticint bcm_cygnus_resume(struct phy_device *phydev)
{ int rc;
genphy_resume(phydev);
/* Re-initialize the PHY to apply AFE work-arounds and * configurations when coming out of suspend.
*/
rc = bcm_cygnus_config_init(phydev); if (rc) return rc;
/* restart auto negotiation with the new settings */ return genphy_config_aneg(phydev);
}
staticint bcm_omega_config_init(struct phy_device *phydev)
{
u8 count, rev; int ret = 0;
/* Dummy read to a register to workaround an issue upon reset where the * internal inverter may not allow the first MDIO transaction to pass * the MDIO management controller and make us return 0xffff for such * reads.
*/
phy_read(phydev, MII_BMSR);
switch (rev) { case 0x00:
ret = bcm_phy_28nm_a0b0_afe_config_init(phydev); break; default: break;
}
if (ret) return ret;
ret = bcm_phy_downshift_get(phydev, &count); if (ret) return ret;
/* Only enable EEE if Wirespeed/downshift is disabled */
ret = bcm_phy_set_eee(phydev, count == DOWNSHIFT_DEV_DISABLE); if (ret) return ret;
return bcm_phy_enable_apd(phydev, true);
}
staticint bcm_omega_resume(struct phy_device *phydev)
{ int ret;
/* Re-apply workarounds coming out suspend/resume */
ret = bcm_omega_config_init(phydev); if (ret) return ret;
/* 28nm Gigabit PHYs come out of reset without any half-duplex * or "hub" compliant advertised mode, fix that. This does not * cause any problems with the PHY library since genphy_config_aneg() * gracefully handles auto-negotiated and forced modes.
*/ return genphy_config_aneg(phydev);
}
switch (tuna->id) { case ETHTOOL_PHY_DOWNSHIFT:
ret = bcm_phy_downshift_set(phydev, count); break; default: return -EOPNOTSUPP;
}
if (ret) return ret;
/* Disable EEE advertisement since this prevents the PHY * from successfully linking up, trigger auto-negotiation restart * to let the MAC decide what to do.
*/
ret = bcm_phy_set_eee(phydev, count == DOWNSHIFT_DEV_DISABLE); if (ret) return ret;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.