/* Description: Configures MII_BMCR to force speed/duplex to the values in phydev. Assumes that the values are valid. Please see phy_sanitize_settings().  */
int genphy_setup_forced(struct phy_device *phydev)
/* Description: Configures MII_BMCR to force speed/duplex to the values in phydev. Assumes that the values are valid. Please see phy_sanitize_settings().  */
int genphy_setup_forced(struct phy_device *phydev)
{
	int err;
	int ctl = 0;
	phydev->pause = phydev->asym_pause = 0;
	if (SPEED_1000 == phydev->speed)
		ctl |= BMCR_SPEED1000;
	else if (SPEED_100 == phydev->speed)
		ctl |= BMCR_SPEED100;
	if (DUPLEX_FULL == phydev->duplex)
		ctl |= BMCR_FULLDPLX;
	err = phy_write(phydev, MII_BMCR, ctl);
	return err;
}