net: stmmac: imx: use phylink's interface mode for set_clk_tx_rate()
Subsystems (5)
PATCH 1/1 net: stmmac: imx: use phylink's interface mode for set_clk_tx_rate()
imx_dwmac_set_clk_tx_rate() is passed the interface mode from phylink which will be the same as plat_dat->phy_interface. Use the passed-in interface mode rather than plat_dat->phy_interface.
--- drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c +0 -3
@@ -195,9 +195,6 @@ static void imx_dwmac_exit(struct platform_device *pdev, void *priv)static int imx_dwmac_set_clk_tx_rate (void *bsp_priv,struct clk *clk_tx_i,phy_interface_t interface,int speed) { -struct imx_priv_data *dwmac = bsp_priv; - - interface = dwmac->plat_dat->phy_interface;if (interface ==PHY_INTERFACE_MODE_RMII || interface ==PHY_INTERFACE_MODE_MII )return 0 ;
Signature · 1 line
2.47.3
Hi Russell,
Quoted 5 lines · Russell King (Oracle)
imx_dwmac_set_clk_tx_rate()is passed the interface mode from phylink which will be the same asplat_dat->phy_interface. Use the passed-in interface mode rather thanplat_dat->phy_interface.Signed-off-by Russell King (Oracle) <[email protected]>
Tested on imx8mp w/ rgmii-id PHY (ksz9131)
Maxime
Quoted 18 lines
--- drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 3 --- 1 file changed, 3 deletions(-)drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c +0
-3@@ -195,9 +195,6 @@ static void imx_dwmac_exit(struct platform_device *pdev, void *priv)static int imx_dwmac_set_clk_tx_rate (void *bsp_priv,struct clk *clk_tx_i,phy_interface_t interface,int speed) { -struct imx_priv_data *dwmac = bsp_priv; - - interface = dwmac->plat_dat->phy_interface;if (interface ==PHY_INTERFACE_MODE_RMII || interface ==PHY_INTERFACE_MODE_MII )return 0 ;
Quoted 5 lines · Russell King (Oracle)
imx_dwmac_set_clk_tx_rate()is passed the interface mode from phylink which will be the same asplat_dat->phy_interface. Use the passed-in interface mode rather thanplat_dat->phy_interface.Signed-off-by Russell King (Oracle) <[email protected]>
While checking patchwork this morning, this patch was unexpectedly marked as superseded. It appears I accidentally posted it as part of the multi-interface stmmac series. This should not have happened. Please apply _this_ patch as it has Maxime's attributations on, whereas the mistakenly reposted patch does not.
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!