imx.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: stmmac: imx: use phylink's interface mode for set_clk_tx_rate()
@ 2025-10-31 11:10 Russell King (Oracle)
  2025-10-31 11:53 ` Maxime Chevallier
  2025-11-04  7:50 ` Russell King (Oracle)
  0 siblings, 2 replies; 3+ messages in thread
From: Russell King (Oracle) @ 2025-10-31 11:10 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Eric Dumazet,
	Fabio Estevam, imx, Jakub Kicinski, linux-arm-kernel, linux-stm32,
	Maxime Coquelin, netdev, Paolo Abeni, Pengutronix Kernel Team,
	Sascha Hauer, Shawn Guo

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.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
index 4268b9987237..147fa08d5b6e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
@@ -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;
-- 
2.47.3


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

* Re: [PATCH net-next] net: stmmac: imx: use phylink's interface mode for set_clk_tx_rate()
  2025-10-31 11:10 [PATCH net-next] net: stmmac: imx: use phylink's interface mode for set_clk_tx_rate() Russell King (Oracle)
@ 2025-10-31 11:53 ` Maxime Chevallier
  2025-11-04  7:50 ` Russell King (Oracle)
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Chevallier @ 2025-10-31 11:53 UTC (permalink / raw)
  To: Russell King (Oracle), Andrew Lunn, Heiner Kallweit
  Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Eric Dumazet,
	Fabio Estevam, imx, Jakub Kicinski, linux-arm-kernel, linux-stm32,
	Maxime Coquelin, netdev, Paolo Abeni, Pengutronix Kernel Team,
	Sascha Hauer, Shawn Guo

Hi Russell,

On 31/10/2025 12:10, Russell King (Oracle) wrote:
> 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.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Tested on imx8mp w/ rgmii-id PHY (ksz9131)

Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>

Maxime

> ---
>  drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
> index 4268b9987237..147fa08d5b6e 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
> @@ -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;


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

* Re: [PATCH net-next] net: stmmac: imx: use phylink's interface mode for set_clk_tx_rate()
  2025-10-31 11:10 [PATCH net-next] net: stmmac: imx: use phylink's interface mode for set_clk_tx_rate() Russell King (Oracle)
  2025-10-31 11:53 ` Maxime Chevallier
@ 2025-11-04  7:50 ` Russell King (Oracle)
  1 sibling, 0 replies; 3+ messages in thread
From: Russell King (Oracle) @ 2025-11-04  7:50 UTC (permalink / raw)
  To: Jakub Kicinski, Paolo Abeni
  Cc: Andrew Lunn, Heiner Kallweit, Alexandre Torgue, Andrew Lunn,
	David S. Miller, Eric Dumazet, Fabio Estevam, imx, Jakub Kicinski,
	linux-arm-kernel, linux-stm32, Maxime Coquelin, netdev,
	Paolo Abeni, Pengutronix Kernel Team, Sascha Hauer, Shawn Guo

On Fri, Oct 31, 2025 at 11:10:26AM +0000, Russell King (Oracle) wrote:
> 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.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

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.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

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

end of thread, other threads:[~2025-11-04  7:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-31 11:10 [PATCH net-next] net: stmmac: imx: use phylink's interface mode for set_clk_tx_rate() Russell King (Oracle)
2025-10-31 11:53 ` Maxime Chevallier
2025-11-04  7:50 ` Russell King (Oracle)

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).