Thread (6 messages) flat view 6 messages, 2 authors, 2019-10-17

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

From: Andrew Lunn <andrew@lunn.ch>
Date: 2019-10-17 22:11:07
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help