netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: ti: am65-cpsw: Fix fwnode passed to phylink_create()
@ 2022-05-24  6:25 Siddharth Vadapalli
  2022-05-26  5:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Siddharth Vadapalli @ 2022-05-24  6:25 UTC (permalink / raw)
  To: davem, kuba, linux
  Cc: netdev, linux-kernel, kishon, vigneshr, grygorii.strashko,
	Siddharth Vadapalli

am65-cpsw-nuss driver incorrectly uses fwnode member of common
ethernet device's "struct device_node" instead of using fwnode
member of the port's "struct device_node" in phylink_create().
This results in all ports having the same phy data when there
are multiple ports with their phy properties populated in their
respective nodes rather than the common ethernet device node.

Fix it here by using fwnode member of the port's node.

Fixes: e8609e69470f ("net: ethernet: ti: am65-cpsw: Convert to PHYLINK")
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 34197c67f8d9..77bdda97b2b0 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -9,6 +9,7 @@
 #include <linux/etherdevice.h>
 #include <linux/if_vlan.h>
 #include <linux/interrupt.h>
+#include <linux/irqdomain.h>
 #include <linux/kernel.h>
 #include <linux/kmemleak.h>
 #include <linux/module.h>
@@ -1981,7 +1982,9 @@ am65_cpsw_nuss_init_port_ndev(struct am65_cpsw_common *common, u32 port_idx)
 
 	phy_interface_set_rgmii(port->slave.phylink_config.supported_interfaces);
 
-	phylink = phylink_create(&port->slave.phylink_config, dev->fwnode, port->slave.phy_if,
+	phylink = phylink_create(&port->slave.phylink_config,
+				 of_node_to_fwnode(port->slave.phy_node),
+				 port->slave.phy_if,
 				 &am65_cpsw_phylink_mac_ops);
 	if (IS_ERR(phylink))
 		return PTR_ERR(phylink);
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: ethernet: ti: am65-cpsw: Fix fwnode passed to phylink_create()
  2022-05-24  6:25 [PATCH] net: ethernet: ti: am65-cpsw: Fix fwnode passed to phylink_create() Siddharth Vadapalli
@ 2022-05-26  5:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-26  5:00 UTC (permalink / raw)
  To: Siddharth Vadapalli
  Cc: davem, kuba, linux, netdev, linux-kernel, kishon, vigneshr,
	grygorii.strashko

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 24 May 2022 11:55:58 +0530 you wrote:
> am65-cpsw-nuss driver incorrectly uses fwnode member of common
> ethernet device's "struct device_node" instead of using fwnode
> member of the port's "struct device_node" in phylink_create().
> This results in all ports having the same phy data when there
> are multiple ports with their phy properties populated in their
> respective nodes rather than the common ethernet device node.
> 
> [...]

Here is the summary with links:
  - net: ethernet: ti: am65-cpsw: Fix fwnode passed to phylink_create()
    https://git.kernel.org/netdev/net/c/0b7180072a9d

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] 2+ messages in thread

end of thread, other threads:[~2022-05-26  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-24  6:25 [PATCH] net: ethernet: ti: am65-cpsw: Fix fwnode passed to phylink_create() Siddharth Vadapalli
2022-05-26  5:00 ` 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;
as well as URLs for NNTP newsgroup(s).