linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: ethernet: ti: am65-cpsw: Fix RGMII configuration at SPEED_10
@ 2022-11-29  5:06 Siddharth Vadapalli
  2022-11-29  5:46 ` Pavan Chebbi
  2022-12-01  6:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 7+ messages in thread
From: Siddharth Vadapalli @ 2022-11-29  5:06 UTC (permalink / raw)
  To: davem, edumazet, kuba, linux, vladimir.oltean, pabeni, rogerq
  Cc: netdev, linux-kernel, linux-arm-kernel, vigneshr, spatton,
	s-vadapalli

The am65-cpsw driver supports configuring all RGMII variants at interface
speed of 10 Mbps. However, in the process of shifting to the PHYLINK
framework, the support for all variants of RGMII except the
PHY_INTERFACE_MODE_RGMII variant was accidentally removed.

Fix this by using phy_interface_mode_is_rgmii() to check for all variants
of RGMII mode.

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

diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 6b0458df613a..6ae802d73063 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -1495,7 +1495,7 @@ static void am65_cpsw_nuss_mac_link_up(struct phylink_config *config, struct phy
 
 	if (speed == SPEED_1000)
 		mac_control |= CPSW_SL_CTL_GIG;
-	if (speed == SPEED_10 && interface == PHY_INTERFACE_MODE_RGMII)
+	if (speed == SPEED_10 && phy_interface_mode_is_rgmii(interface))
 		/* Can be used with in band mode only */
 		mac_control |= CPSW_SL_CTL_EXT_EN;
 	if (speed == SPEED_100 && interface == PHY_INTERFACE_MODE_RMII)
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-12-01  6:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-29  5:06 [PATCH net] net: ethernet: ti: am65-cpsw: Fix RGMII configuration at SPEED_10 Siddharth Vadapalli
2022-11-29  5:46 ` Pavan Chebbi
2022-11-29 16:46   ` Vladimir Oltean
2022-11-30  5:59     ` Siddharth Vadapalli
2022-11-30  5:24   ` Siddharth Vadapalli
2022-11-30  5:56     ` Pavan Chebbi
2022-12-01  6: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).