Messages in this thread | | | Date | Fri, 18 Oct 2019 00:11:01 +0200 | From | Andrew Lunn <> | Subject | Re: [PATCH net-next v2 2/2] net: phy: Add ability to debug RGMII connections |
| |
> If all is well, we stop iterating over all possible RGMII combinations > and offer the one that is deemed suitable which is what an user should > be trying by configuring the platform appropriately.
Hi Florian
This is no longer true. You now iterate over all modes.
> +int phy_rgmii_debug_probe(struct phy_device *phydev) > +{
> + /* Now probe all modes */ > + for (i = 0; i < ARRAY_SIZE(rgmii_modes); i++) { > + ret = phy_rgmii_probe_interface(priv, rgmii_modes[i]); > + if (ret == 0) > + netdev_info(ndev, "Determined \"%s\" to be correct\n", > + phy_modes(rgmii_modes[i])); > + }
I see two different use cases for this code.
1) Find the right mode
2) Test if the PHY driver is doing the right thing with different modes.
You are concentrating more on the first, but i think the second is also important. I think we can give the novice user a few more guidelines. We can count the number of modes which work. If that count != 1, we know we have a driver problem. We should ask the user to report the problem, including details of the MAC and PHY driver.
Andrew
| |