Re: [PATCH net-next v2 8/8] net: phy: add X-Powers AC200/AC300 EPHY driver

Andrew Lunn <[email protected]>
Newsgroups org.infradead.lists.linux-arm-kernel,dev.linux.lists.mfd,org.infradead.lists.linux-rockchip,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
> +static int acx00_ephy_disable_eee(struct phy_device *phydev)
> +{
> +	int ret;
> +
> +	ret = phy_modify_paged(phydev, ACX00_PAGE_1,
> +			       ACX00_PAGE1_INTELLIGENT_EEE_CONTROL_REG,
> +			       ACX00_PAGE1_INTELLIGENT_EEE_ENABLE, 0);
> +	if (ret)
> +		return ret;
> +
> +	return phy_clear_bits_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV,
> +				  MDIO_EEE_100TX);
> +}


> +
> +	/* Set the hardware default before phylib reads its EEE advertisement. */
> +	ret = acx00_ephy_disable_eee(phydev);
> +	if (ret)
> +		return dev_err_probe(dev, ret,
> +				     "failed to disable EEE\n");

If the PHY is capable of doing MAC based EEE, that should be the
default.

Why clear MDIO_AN_EEE_ADV? This does not stop the user from
re-enabling EEE for this link mode. phy_disable_eee_mode().

	Andrew
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.