Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] net: lan969x: correct RGMII port mapping index
@ 2026-09-22 12:50 Robert Marko
  2026-09-26 14:06 ` netdev-bot+sashiko
  2026-09-28  9:18 ` Daniel Machon
  0 siblings, 2 replies; 6+ messages in thread
From: Robert Marko @ 2026-09-22 12:50 UTC (permalink / raw)
  To: daniel.machon, UNGLinuxDriver, andrew+netdev, davem, edumazet,
	kuba, pabeni, Steen.Hegelund, netdev, linux-arm-kernel,
	linux-kernel
  Cc: luka.perkov, Robert Marko

Currently, the lan969x_port_dev_mapping does not check for RGMII ports
and just returns the physical port index.

However, this does not work for RGMII ports as they have dedicated DEVRGMII
register space with an dedicated instance per RGMII port.

So, check if requested port index is an RGMII port and return the correct
DEVRGMII index.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 drivers/net/ethernet/microchip/sparx5/lan969x/lan969x.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/ethernet/microchip/sparx5/lan969x/lan969x.c b/drivers/net/ethernet/microchip/sparx5/lan969x/lan969x.c
index f3a9c71bea36a..bf5320c7a6ca8 100644
--- a/drivers/net/ethernet/microchip/sparx5/lan969x/lan969x.c
+++ b/drivers/net/ethernet/microchip/sparx5/lan969x/lan969x.c
@@ -142,6 +142,15 @@ static u32 lan969x_get_dev_mode_bit(struct sparx5 *sparx5, int port)
 
 static u32 lan969x_port_dev_mapping(struct sparx5 *sparx5, int port)
 {
+	if (lan969x_port_is_rgmii(port)) {
+		switch (port) {
+		case 28:
+			return 0;
+		case 29:
+			return 1;
+		}
+	}
+
 	if (lan969x_port_is_5g(port)) {
 		switch (port) {
 		case 9:
-- 
2.55.0


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

end of thread, other threads:[~2026-09-28 12:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-22 12:50 [PATCH net-next] net: lan969x: correct RGMII port mapping index Robert Marko
2026-09-26 14:06 ` netdev-bot+sashiko
2026-09-28  9:18 ` Daniel Machon
2026-09-28 10:39   ` Robert Marko
2026-09-28 11:04     ` Daniel Machon
2026-09-28 12:29       ` Robert Marko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox