* [PATCH net-next] net: phylink: use phylink_expects_phy() in phylink_fwnode_phy_connect()
@ 2026-03-24 10:46 Russell King (Oracle)
2026-03-26 7:38 ` Maxime Chevallier
2026-03-27 1:32 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Russell King (Oracle) @ 2026-03-24 10:46 UTC (permalink / raw)
To: Andrew Lunn
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, netdev,
Paolo Abeni
The tests in phylink_expects_phy() and phylink_fwnode_phy_connect() are
identical (by intention). Use phylink_expects_phy() to decide whether
to ignore a call to phylink_fwnode_phy_connect().
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
drivers/net/phy/phylink.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index f80cd13c8e32..087ac63f9193 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -2295,14 +2295,12 @@ int phylink_fwnode_phy_connect(struct phylink *pl,
struct phy_device *phy_dev;
int ret;
- /* Fixed links and 802.3z are handled without needing a PHY */
- if (pl->cfg_link_an_mode == MLO_AN_FIXED ||
- (pl->cfg_link_an_mode == MLO_AN_INBAND &&
- phy_interface_mode_is_8023z(pl->link_interface)))
+ if (!phylink_expects_phy(pl))
return 0;
phy_fwnode = fwnode_get_phy_node(fwnode);
if (IS_ERR(phy_fwnode)) {
+ /* PHY mode requires a PHY to be specified. */
if (pl->cfg_link_an_mode == MLO_AN_PHY)
return -ENODEV;
return 0;
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next] net: phylink: use phylink_expects_phy() in phylink_fwnode_phy_connect()
2026-03-24 10:46 [PATCH net-next] net: phylink: use phylink_expects_phy() in phylink_fwnode_phy_connect() Russell King (Oracle)
@ 2026-03-26 7:38 ` Maxime Chevallier
2026-03-27 1:32 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Chevallier @ 2026-03-26 7:38 UTC (permalink / raw)
To: Russell King (Oracle), Andrew Lunn
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, netdev,
Paolo Abeni
On 24/03/2026 11:46, Russell King (Oracle) wrote:
> The tests in phylink_expects_phy() and phylink_fwnode_phy_connect() are
> identical (by intention). Use phylink_expects_phy() to decide whether
> to ignore a call to phylink_fwnode_phy_connect().
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: phylink: use phylink_expects_phy() in phylink_fwnode_phy_connect()
2026-03-24 10:46 [PATCH net-next] net: phylink: use phylink_expects_phy() in phylink_fwnode_phy_connect() Russell King (Oracle)
2026-03-26 7:38 ` Maxime Chevallier
@ 2026-03-27 1:32 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-27 1:32 UTC (permalink / raw)
To: Russell King; +Cc: andrew, davem, edumazet, kuba, netdev, pabeni
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 24 Mar 2026 10:46:52 +0000 you wrote:
> The tests in phylink_expects_phy() and phylink_fwnode_phy_connect() are
> identical (by intention). Use phylink_expects_phy() to decide whether
> to ignore a call to phylink_fwnode_phy_connect().
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> drivers/net/phy/phylink.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
Here is the summary with links:
- [net-next] net: phylink: use phylink_expects_phy() in phylink_fwnode_phy_connect()
https://git.kernel.org/netdev/net-next/c/b83c28328fee
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-27 1:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-24 10:46 [PATCH net-next] net: phylink: use phylink_expects_phy() in phylink_fwnode_phy_connect() Russell King (Oracle)
2026-03-26 7:38 ` Maxime Chevallier
2026-03-27 1:32 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox