Re: [PATCH net-next v2 2/2] net: phy: Add ability to debug RGMII connections

From: Andrew Lunn
Date: Thu Oct 17 2019 - 18:14:54 EST


> +#ifdef CONFIG_PHY_RGMII_DEBUG
> +int phy_rgmii_debug_probe(struct phy_device *phydev);
> +#else
> +static inline int phy_rgmii_debug_probe(struct phy_device *phydev)
> +{
> + return -EOPNOTSUPP;
> +}
> +#endif

Hi Florian

Jose wanted to make use of this in his self test code for stmmac. I
think to make this more user friendly in that setup, it would be good
to return the phy_mode which works, if only one works. The MAC driver
can then compare the what it thinks the mode should be to what
actually works, and report a test failure if they differ.

Andrew