net: phylink: handle NA interface mode in phylink_fwnode_phy_connect()
Subsystems (4)
PATCH 1/1 net: phylink: handle NA interface mode in phylink_fwnode_phy_connect()
Commit 4904b6ea1f9db ("net: phy: phylink: Use PHY device interface if N/A") introduced handling for the phy interface mode where this is not known at phylink creation time. This was never added to the OF/fwnode paths, but is necessary when the phy is present in DT, but the phy-mode is not specified.
Add this handling.
---
Hi Florian,
It owuld be useful to have your ACK for this since you were the original author for the above referenced commit. Thanks!
drivers/net/phy/phylink.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/net/phy/phylink.c +8 -1
@@ -1325,7 +1325,8 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy,mutex_unlock (&phy->lock);phylink_dbg (pl, -"phy: setting supported %*pb advertising %*pb\n" , +"phy: %s setting supported %*pb advertising %*pb\n" , +phy_modes (interface), __ETHTOOL_LINK_MODE_MASK_NBITS, pl->supported, __ETHTOOL_LINK_MODE_MASK_NBITS, phy->advertising);
@@ -1443,6 +1444,12 @@ int phylink_fwnode_phy_connect(struct phylink *pl,if (!phy_dev)return -ENODEV ; +/* Use PHY device/driver interface */ +if (pl->link_interface ==PHY_INTERFACE_MODE_NA ) { + pl->link_interface = phy_dev->interface; + pl->link_config.interface = pl->link_interface; + } + ret =phy_attach_direct (pl->netdev, phy_dev, flags, pl->link_interface);if (ret) {
Signature · 1 line
2.30.2
Quoted 9 lines · Russell King (Oracle)
Commit
4904b6ea1f9db("net: phy: phylink: Use PHY device interface if N/A") introduced handling for the phy interface mode where this is not known at phylink creation time. This was never added to the OF/fwnode paths, but is necessary when the phy is present in DT, but the phy-mode is not specified.Add this handling.
Signed-off-by Russell King (Oracle) <[email protected]>
Signature · 1 line
Florian
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Quoted 9 lines · On Fri, 19 Nov 2021 16:28:06 +0000 you wrote:
Commit
4904b6ea1f9db("net: phy: phylink: Use PHY device interface if N/A") introduced handling for the phy interface mode where this is not known at phylink creation time. This was never added to the OF/fwnode paths, but is necessary when the phy is present in DT, but the phy-mode is not specified.Add this handling.
[...]
Here is the summary with links:
- [net-next] net: phylink: handle NA interface mode in phylink_fwnode_phy_connect()
https://git.kernel.org/netdev/net-next/c/a18e6521a7d9
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html