From: Sean Anderson <hidden> Date: 2021-10-22 16:36:08
This adds an optional mdio bus child node. If present, the mac will
look for PHYs there instead of directly under the top-level node. This
eliminates any ambiguity about whether child nodes are PHYs, and allows
the MDIO bus to contain non-PHY devices.
Signed-off-by: Sean Anderson <redacted>
---
Documentation/devicetree/bindings/net/macb.txt | 4 ++++
1 file changed, 4 insertions(+)
@@ -30,6 +30,10 @@ Required properties: Optional elements: 'tsu_clk' - clocks: Phandles to input clocks.+Optional properties:+- mdio: node containing PHY children. If this node is not present, then PHYs+ will be direct children.+ The MAC address will be determined using the optional properties defined in ethernet.txt.
From: Sean Anderson <hidden> Date: 2021-10-22 16:36:15
This allows explicitly specifying which children are present on the mdio
bus. Additionally, it allows for non-phy MDIO devices on the bus.
Signed-off-by: Sean Anderson <redacted>
---
drivers/net/ethernet/cadence/macb_main.c | 11 +++++++++++
1 file changed, 11 insertions(+)
@@ -898,6 +898,17 @@ static int macb_mdiobus_register(struct macb *bp){structdevice_node*child,*np=bp->pdev->dev.of_node;+/* If we have a child named mdio, probe it instead of looking for PHYs+*directlyundertheMACnode+*/+child=of_get_child_by_name(np,"mdio");+if(np){+intret=of_mdiobus_register(bp->mii_bus,child);++of_node_put(child);+returnret;+}+if(of_phy_is_fixed_link(np))returnmdiobus_register(bp->mii_bus);
From: Andrew Lunn <andrew@lunn.ch> Date: 2021-10-22 19:38:02
On Fri, Oct 22, 2021 at 12:35:47PM -0400, Sean Anderson wrote:
This adds an optional mdio bus child node. If present, the mac will
look for PHYs there instead of directly under the top-level node. This
eliminates any ambiguity about whether child nodes are PHYs, and allows
the MDIO bus to contain non-PHY devices.
Signed-off-by: Sean Anderson <redacted>
From: Andrew Lunn <andrew@lunn.ch> Date: 2021-10-22 19:39:27
On Fri, Oct 22, 2021 at 12:35:47PM -0400, Sean Anderson wrote:
This adds an optional mdio bus child node. If present, the mac will
look for PHYs there instead of directly under the top-level node. This
eliminates any ambiguity about whether child nodes are PHYs, and allows
the MDIO bus to contain non-PHY devices.
Hi Sean
Please always have a patch 0/X for patchsets, which explains the big
picture of the patchset. This is also used as the merge commit
message.
Andrew
From: Andrew Lunn <andrew@lunn.ch> Date: 2021-10-22 19:43:46
On Fri, Oct 22, 2021 at 12:35:48PM -0400, Sean Anderson wrote:
This allows explicitly specifying which children are present on the mdio
bus. Additionally, it allows for non-phy MDIO devices on the bus.
Signed-off-by: Sean Anderson <redacted>
Hello:
This series was applied to netdev/net-next.git (master)
by David S. Miller [off-list ref]:
On Fri, 22 Oct 2021 12:35:47 -0400 you wrote:
This adds an optional mdio bus child node. If present, the mac will
look for PHYs there instead of directly under the top-level node. This
eliminates any ambiguity about whether child nodes are PHYs, and allows
the MDIO bus to contain non-PHY devices.
Signed-off-by: Sean Anderson <redacted>
[...]
Hi,
while bisecting I noticed the following.
On Fri, Oct 22, 2021 at 12:35:48PM -0400, Sean Anderson wrote:
quoted hunk
This allows explicitly specifying which children are present on the mdio
bus. Additionally, it allows for non-phy MDIO devices on the bus.
Signed-off-by: Sean Anderson <redacted>
---
drivers/net/ethernet/cadence/macb_main.c | 11 +++++++++++
1 file changed, 11 insertions(+)
@@ -898,6 +898,17 @@ static int macb_mdiobus_register(struct macb *bp){structdevice_node*child,*np=bp->pdev->dev.of_node;+/* If we have a child named mdio, probe it instead of looking for PHYs+*directlyundertheMACnode+*/+child=of_get_child_by_name(np,"mdio");+if(np){
s/np/child/
to avoid network interface failures with messages like
[ 12.764530] macb 10090000.ethernet eth0: Could not attach PHY (-19)
I'll send a patch in a minute to fix this up, after bisect is complete
and after testing, to make sure that there is no additional problem.
Guenter
+ int ret = of_mdiobus_register(bp->mii_bus, child);
+
+ of_node_put(child);
+ return ret;
+ }
+
if (of_phy_is_fixed_link(np))
return mdiobus_register(bp->mii_bus);
--
2.25.1