From: Siddharth Vadapalli Date: Tue, 24 May 2022 06:25:58 +0000 (+0530) Subject: net: ethernet: ti: am65-cpsw: Fix fwnode passed to phylink_create() X-Git-Tag: baikal/aarch64/sdk6.1~3836^2~52 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=0b3c18d490ef361ad859ae96f90a331df3c87501;p=kernel.git net: ethernet: ti: am65-cpsw: Fix fwnode passed to phylink_create() 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: e2109dceab93 ("net: ethernet: ti: am65-cpsw: Convert to PHYLINK") Signed-off-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20220524062558.19296-1-s-vadapalli@ti.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 34197c67f8d9b..77bdda97b2b08 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -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);