* [PATCH net] net: lan743x: fix duplex configuration in mac_link_up
@ 2026-03-23 6:53 Thangaraj Samynathan
2026-03-23 9:32 ` Russell King (Oracle)
2026-03-25 4:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Thangaraj Samynathan @ 2026-03-23 6:53 UTC (permalink / raw)
To: bryan.whitehead, UNGLinuxDriver, andrew+netdev, davem, edumazet,
kuba, pabeni, linux, Raju.Lakkaraju, maxime.chevallier
Cc: netdev, linux-kernel
The driver does not explicitly configure the MAC duplex mode when
bringing the link up. As a result, the MAC may retain a stale duplex
setting from a previous link state, leading to duplex mismatches with
the link partner and degraded network performance.
Update lan743x_phylink_mac_link_up() to set or clear the MAC_CR_DPX_
bit according to the negotiated duplex mode.
This ensures the MAC configuration is consistent with the phylink
resolved state.
Fixes: a5f199a8d8a03 ("net: lan743x: Migrate phylib to phylink")
Signed-off-by: Thangaraj Samynathan <thangaraj.s@microchip.com>
---
drivers/net/ethernet/microchip/lan743x_main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 866f6a3da0d9..2939b5e933d2 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -3056,6 +3056,11 @@ static void lan743x_phylink_mac_link_up(struct phylink_config *config,
else if (speed == SPEED_100)
mac_cr |= MAC_CR_CFG_L_;
+ if (duplex == DUPLEX_FULL)
+ mac_cr |= MAC_CR_DPX_;
+ else
+ mac_cr &= ~MAC_CR_DPX_;
+
lan743x_csr_write(adapter, MAC_CR, mac_cr);
lan743x_ptp_update_latency(adapter, speed);
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: lan743x: fix duplex configuration in mac_link_up
2026-03-23 6:53 [PATCH net] net: lan743x: fix duplex configuration in mac_link_up Thangaraj Samynathan
@ 2026-03-23 9:32 ` Russell King (Oracle)
2026-03-25 4:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Russell King (Oracle) @ 2026-03-23 9:32 UTC (permalink / raw)
To: Thangaraj Samynathan
Cc: bryan.whitehead, UNGLinuxDriver, andrew+netdev, davem, edumazet,
kuba, pabeni, Raju.Lakkaraju, maxime.chevallier, netdev,
linux-kernel
On Mon, Mar 23, 2026 at 12:23:45PM +0530, Thangaraj Samynathan wrote:
> The driver does not explicitly configure the MAC duplex mode when
> bringing the link up. As a result, the MAC may retain a stale duplex
> setting from a previous link state, leading to duplex mismatches with
> the link partner and degraded network performance.
>
> Update lan743x_phylink_mac_link_up() to set or clear the MAC_CR_DPX_
> bit according to the negotiated duplex mode.
>
> This ensures the MAC configuration is consistent with the phylink
> resolved state.
>
> Fixes: a5f199a8d8a03 ("net: lan743x: Migrate phylib to phylink")
> Signed-off-by: Thangaraj Samynathan <thangaraj.s@microchip.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thanks!
--
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
* Re: [PATCH net] net: lan743x: fix duplex configuration in mac_link_up
2026-03-23 6:53 [PATCH net] net: lan743x: fix duplex configuration in mac_link_up Thangaraj Samynathan
2026-03-23 9:32 ` Russell King (Oracle)
@ 2026-03-25 4:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-25 4:00 UTC (permalink / raw)
To: Thangaraj Samynathan
Cc: bryan.whitehead, UNGLinuxDriver, andrew+netdev, davem, edumazet,
kuba, pabeni, linux, Raju.Lakkaraju, maxime.chevallier, netdev,
linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 23 Mar 2026 12:23:45 +0530 you wrote:
> The driver does not explicitly configure the MAC duplex mode when
> bringing the link up. As a result, the MAC may retain a stale duplex
> setting from a previous link state, leading to duplex mismatches with
> the link partner and degraded network performance.
>
> Update lan743x_phylink_mac_link_up() to set or clear the MAC_CR_DPX_
> bit according to the negotiated duplex mode.
>
> [...]
Here is the summary with links:
- [net] net: lan743x: fix duplex configuration in mac_link_up
https://git.kernel.org/netdev/net/c/71399707876b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-25 4:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23 6:53 [PATCH net] net: lan743x: fix duplex configuration in mac_link_up Thangaraj Samynathan
2026-03-23 9:32 ` Russell King (Oracle)
2026-03-25 4: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